You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var el = document.getElementById("testid");
var iframe = document.getElementById("iframe");
var iframeDocument = iframe.contentWindow.document;
iframeDocument.write("<html><head></head><body><p id=\"xxx\" >Main title</p></body></html>");
var iframeBody = iframeDocument.body;
iframeBody.appendChild(el);
iframeDocument is not instrumented, so is iframeBody. iframeBody.appendChild(el); leads to a crash.
We observed this behavior in pubads_impl_86.js from www.cnn.com.
The text was updated successfully, but these errors were encountered:
The key to fix this issue is that we should always try to create a proxy for iframe's window. When the iframe is from the same origin this fix will allow us to instrument iframe DOM operations, and when the iframe is from a different origin, it should not work anyways.
yuhao
changed the title
Code in iframe that interacts with the root window document could be incorrect
Interaction with iframe that's from the same origin is incorrect
May 12, 2016
Consider the following code:
iframeDocument is not instrumented, so is iframeBody.
iframeBody.appendChild(el);
leads to a crash.We observed this behavior in
pubads_impl_86.js
from www.cnn.com.The text was updated successfully, but these errors were encountered: