Issue with code loaded in a separate iFrame
See original GitHub issueI have a somewhat strange usage for Preact. I am the owner of a library ( GWTReact) that allows you to use React in Java via the Google GWT compiler. I am interested in also supporting Preact (with the react compat library). From my initial testing it basically works except for one case where arrays of child elements are passed. GWT loads the transpiled Java code in an iFrame which is different than the Preact script is loaded. The following line of code is the problem:
function h(nodeName, attributes) {
.
.
while (stack.length) if ((child = stack.pop()) instanceof Array) ....... {
The problem is that instanceof doesn’t work if the array was created by code in the other iFrame. So I changed it to Array.isArray and it works fine
function h(nodeName, attributes) {
.
.
while (stack.length) if ((child = stack.pop()) && Array.isArray(child)) ....... {
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
iframe in iframe won't load - Stack Overflow
I run into some trouble with an cross domain iframe hack. I have an iframe "if1" on my page that contains another iframe...
Read more >The ultimate guide to iframes - LogRocket Blog
The load event. It is triggered when the iframe is fully loaded. In other words, all static assets have been downloaded, and all...
Read more >How to Load HTML, CSS, and JS Code into an iFrame
Solution: Blob URLs · First we used srcdoc to load data instead of loading from a URL · Then we used the boomerang...
Read more >How to load a hyperlink from one iframe to another iframe
Our problem will be solved if we keep the value of the target as the name of the destination iframe where the hyperlink...
Read more >[Solved] Iframe loading problem - CodeProject
Use event onload of your iframe . Just one example: http://www.w3schools.com/jsref/event_frame_onload.asp[^]. ... this i frame is inside div and ...
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 Free
Top 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
Great. Thanks a lot.
@pstockley I’ve found a way to remove the Array constructor reliance in 8.0 😃