elemental2.dom.Window is missing document variable
See original GitHub issueI’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:
public final native elemental2.dom.Document document(elemental2.dom.Window contentWindow) /*-{
return contentWindow.document;
}-*/;
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Missing DOM element - javascript - Stack Overflow
Ah, here we go: DOM Level 0. Not part of any standard. - so it works elsewhere. As I checked, the name is...
Read more >Window - Web APIs - MDN Web Docs - Mozilla
desktop desktop
Chrome Edge
Window Full support. Chrome1. Toggle history Full support. Edge12. To...
DOMContentLoaded event Full support. Chrome1. Toggle history Full support. Edge12. To...
Read more >gwtproject/gwt - Gitter
getPropertyValue('--my-variable-name');. I looked at a getComputedStyle method in DomGlobal.window and DomGlobal.document but could not find it.
Read more >Accessing Element IDs in DOM as window/global Variables
5. attach and remove event listeners to the element. <div id="so_many">So many to think about</div> <script> const so_many = document.
Read more >Experimental release of Elemental2 - Google Groups
A new experimental version of Elemental2 using the new JsInterop specification has been pushed on Sonatype today. You can try it by downloading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
If you need to access the body, you can still work around this problem by using jsinterop-base: