taoeffect / vue-script2

Standardized, designer-friendly <script> behavior for your Single Page App
171 stars 15 forks source link

scripts with document.write to fails to execute #13

Open shakee93 opened 6 years ago

shakee93 commented 6 years ago

scripts with document.write fails to execute. is there any workaround to bypass this ? it is working without vue.. it doesnt work when i use the script2.

this is the warning : Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

taoeffect commented 6 years ago

I have no idea how to "explicitly open" whatever it's talking about, and also haven't the time at the moment to investigate this myself (sorry).

But this is an acknowledged bug and if anyone else has any suggestions please let me know!

shakee93 commented 6 years ago

i have done some research these lib's seems to solve the issue.. we can get an idea to fix this

https://github.com/krux/postscribe https://github.com/iamnoah/writeCapture

shakee93 commented 6 years ago

postscribe fixes the issue.. checkout the jsfiddle

https://jsfiddle.net/shakee93/43hou4kt/