Debugging "unsafe javascript attempt to access frame with url ..."

Thus, the error message is a security restriction for accessing the parent frame or window from the frame (i) from another domain.

(Unsafe javascript is trying to access the frame with the url xxx from the frame with the url yyy. Domains, protocols, and ports must match).

However, there is no line shown in webkit or chrome from where this error is generated.

So, how do I get a list of lines that violate this? I know I can just search, but does this also apply to cookies (document.cookie, etc.)? Is there a list of things that are prohibited?

Edit: Also, what do I need to use instead of $ (window.top)?

Thanks.

+1
source share
2 answers

If you own all the pages (the content document and the iframe document), just insert one javascript in each of them so that they can communicate happily:

document.domain = 'myDomain.com'; 
0
source

Any call from within the frame to the window instead of window.frames [my frame] will lead to a violation if you do not have the document.domain document corresponding to the parent element set. https://developer.mozilla.org/en/DOM/document.domain

0
source

All Articles