I wanted to try and port a Javascript (VueJS) app to ZeroNet, but I got the following error:
Error: Permission denied to access property "document"
There was attempt to access an object for which you have no permission. This is likely an
Is it possible to host in ZeroNet Javascript apps?
I get the following message in Firefox console:
SecurityError: Permission denied to access property "document" on cross-origin object
In Tor Browser:
Error: Permission denied to access property "document"
Additional information: There was attempt to access an object for which you have no permission. This is likely an
Run the application without errors.
English is not my mother tongue; please excuse any errors on my part.
ZeroNet opens all your HTML files in <iframe>, so some things don't work because of SecurityError's. For example, top.isRemotePresenter throws an error. I'll try look what makes that error in Vue, but that may result in changing built code.
Can you show your index.html?
Afaik, Vue by itself shouldn't have any problems as I use vue for all of my zites without having to change the library in any way.
@krixano Not Vue, but maybe some plugin is generating incorrect code.
@imachug Yeah, it could definitely be a Vue plugin.
The Firebase plugin was the problem. After disabling it I can see the website inside ZeroNet.
Thank you.
Most helpful comment
@krixano Not Vue, but maybe some plugin is generating incorrect code.