#Can Electron "tell" its page that it is not running locally?
14 messages · Page 1 of 1 (latest)
well, it's better not to disable it
for example, I have a three.js game, that fully client-side, but can't run locally because of some security restrictions about webgl canvas
what kind of error do you get?
I don't remember now.
The idea is to have the static web page inside the electron appear exactly the same as in a browser window. At first I thought this was a trivial task.
your packaged app load a local file?
Like if I had index.html, style.css and script.js and host it locally via npm http-server
Yes
I know webSecurity can be annoying in dev because it will block some local resources when working with localhost, but it's not a problem in prod because everything is local, so webSecurity can be disabled in dev and enabled in prod and it works fine
I don't know if it's the same with webgl though
I'm not sure disabling webSecurity will be enough. It is more like I need to host web-page at 127.0.0.1 and open it via Electron's browser view.