[BUG] Scripts do not work when added dynamically added to iframe <head>
See original GitHub issueI am using the latest version of grapesjs (0.15.8) and running it on Windows 10 x64 on Electron (this is not a issue with electron) and am facing a problem when I try to dynamically attach scripts to the editor iframe, I have included a link to CodePen for more on this issue. In my project I have to dynamically change scripts. Scripts only work when I add them through canvas: {scripts: ['...']}
not when I $(editor.Canvas.getDocument().head).append("...");
Please suggest fix or workaround. (love the project btw)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Why does appending a <script> to a dynamically created ...
One thing that seems unusual is that the the code in iframe_test.js even works; I haven't loaded jQuery in the <iframe> itself, only...
Read more >Dynamically created iframe contents don't stay if script that ...
Yes., Calling "Start" works well. But inserting a script node with Start in it has this problem. I see that iframe that is...
Read more >IFrame in IE9 won't run script when dynamically updated
I am trying to get the following page to run in IE9. Basically it takes a prebuilt HTML page stored as a string...
Read more >content script load into dynamically added IFrame
Just identified, if the Iframe src is different then actual src then it's not able to load content scripts into it,. for example:...
Read more >Resource loading: onload and onerror
For instance, there's no such script (error 404) or the server is down ... Most resources start loading when they are added to...
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
Hi there! see if this can help you out:
cheers!
Ok thanks a lot.