This question was closed as off-topic, so I've marked the missing info.
Specific problem or error plus shortest code neccesary:
The code below doesn't work in IE11, if it's in an iframe of certain websites.
("Certain" is not specific, but I don't have a public demo. I can't make one, until I find the cause in my private code. Still, the question is specific enough to be answered by an expert, that's why I've asked SO instead of a long debugging process without any idea.)
The forEach() method executes a provided function once per array
element. - MDN