dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.09k stars 1.56k forks source link

document is not a member of WindowBase #9224

Closed DartBot closed 9 years ago

DartBot commented 11 years ago

This issue was originally filed by nicolas....@gmail.com


from http://stackoverflow.com/questions/15444109/document-is-not-a-member-of-windowbase

* What steps will reproduce the problem?

IFrameElement iframe = query('#myframe iframe'); WindowBase iframeW = iframe.contentWindow; var myframeDoc = iframeW.document; // not member error

* What is the expected output? What do you see instead?

I think it should works because, it can write this with javascrit :

var myframeDoc = document.querySelector('#myframe iframe').contentWindow.document;

I'am using build 0.4.1.0_r19425

kasperl commented 11 years ago

Added Area-HTML, Triaged labels.

DartBot commented 11 years ago

This comment was originally written by antonm@google.com


This is by design: we don't allow cross-frame DOM access. Please, use isolates or postMessage to communicate.


Added WontFix label.

DartBot commented 11 years ago

This comment was originally written by antonm@google.com


cc @vsmenon.

DartBot commented 10 years ago

This comment was originally written by oking...@google.com


Given this, what is the desired method for decorating an existing page? (One which is external to the dart application - think chrome extension style)

vsmenon commented 10 years ago

Please see 20146 - we're rethinking this limitation.

Currently, you have two options:

DartBot commented 10 years ago

This comment was originally written by oking...@google.com


Thanks for fast response, I'll follow that issue.

Option 2 isn't a good option in this case. I really wish the dart APIs were cross-frame here because the js interop is painful :/

DanielJoyce commented 9 years ago

postMessage has TERRIBLE restrictions,

zoechi commented 9 years ago

@DanielJoyce Usually it helps to provide concrete use cases where a bug or missing feature blocks you. I'm not entirely sure for this issue though. Looks a bit like a dead horse. But there where quite a few other issues which were finally fixed with nice solutions after a long time.

DanielJoyce commented 9 years ago

Which might be true. But TypedScript is stealing darts thunder, and with the death of Google Dev Editor, so dies the biggest pressing need for Google to fix the issues inherent in trying to write multi-screen chrome apps.