-
Notifications
You must be signed in to change notification settings - Fork 38
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
elemental2.dom.Window is missing document variable #60
Comments
Contribution is welcome here. This can be easily fixed by
|
We already have: import static elemental2.dom.DomGlobal.document; |
You are right but DomGlobal.document and DomGlobal.window are targeting the global document and window objects. The goal is to access document from any Window object that could potentially comes from an IFrame. |
I have a question to this problem. So, at the moment I cannot register an event like onclick to an iFrame, is that correct? Thanks |
If you need to access the body, you can still work around this problem by using jsinterop-base: import jsinterop.base.Js;
HTMLBodyElement iframeBody = Js.asPropertyMap(iframe.contentWindow).get("body");
iframeBody.addEventListener(...) |
I'm trying to access the document from a elemental2.dom.HTMLIFrameElement but noticed that elemental2.dom.Window (via HTMLIFrameElement.contentWindow) has no document variable.
There is no chance to access an iframe document via elemental2.
This should be possible. Please see more details in the example at https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow
I need to solve that via native gwt code:
The text was updated successfully, but these errors were encountered: