Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No access to Document from IFrame #20944

Closed
DartBot opened this issue Sep 12, 2014 · 1 comment
Closed

No access to Document from IFrame #20944

DartBot opened this issue Sep 12, 2014 · 1 comment
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Sep 12, 2014

This issue was originally filed by dpidcock...@google.com


I'm trying to access the document element of an iFrame in Chrome.

In Javascript I would try the following :

          (frame.contentDocument || frame.contentWindow.document);

In Dart, the above properties do not exist in the generated Native Wrappers, but can be accessed through JsObject ;

  Element e = new Element.iframe();
  document.body.append(e);
  JsObject enative = new JsObject.fromBrowserObject(e);
  print (enative['contentWindow']['document']);
  print (e.contentWindow.document);

produces:

[object HTMLDocument]
Breaking on exception: Class '_DOMWindowCrossFrame' has no instance getter 'document'.

Same for contentDocument.

@vsmenon
Copy link
Member

vsmenon commented Sep 12, 2014

Added Duplicate label.
Marked as being merged into #20146.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

3 participants