I am using GWT to process a very old web site. This web site has a lot of iframes. Each iframe has a relative url or '#' for its src. The compiled javascript - *.nocache.js is included in top document head.
-- After a page is loaded, I click a link and the page generate following iframe in ajax way.
<iframe src="mybottom?openform">
<html>
<body>
<div/>
<div/>
</body>
</html>
</iframe>
On OnLoad event, I have following code:
IFrameElement iframeElement; //I get an instance variable for above iframe element
NodeList<Node> childNodes = iframeElement.getChildNodes();
int length = childNodes.getLength();
logger.info("childNodes length=" + length); //print out "childNodes length=0"
final Document contentDocument = iframeElement.getContentDocument(); //Got UncaughtException: (SecurityError) : Blocked a frame with origin "http://xxx.com" from //accessing a cross-origin frame.
I cannot understand why I got "cross-origin frame" issue because they are same domain.
I do appreciate your help.
David
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment