nraynaud / webgcode

Online G-Code simulator, controller code for STM32F4-Discovery and google chrome extension to send the code to it.
http://nraynaud.github.io/webgcode/webapp/visucamTest.html#/
Other
376 stars 164 forks source link

Chrome blocks Workers #36

Open jalovisko opened 3 years ago

jalovisko commented 3 years ago

I decided to try webgcode locally using Chrome but there was an error in index.html saying

Uncaught DOMException: Failed to construct 'Worker': Script at 'file:///home/jalovisko/dev/webgcode/webapp/worker.js#3DView' cannot be accessed from origin 'null'.

Searching revealed that Workers don't work locally in Chrome, and indeed the page loads nice and clean in Firefox. However, I see here on Stack Overfloww a workaround for Chrome which I think sounds easy to implement. I can fork and fix this one if it's ok.

nraynaud commented 3 years ago

Hi Nikita, it is absolutely no problem, please do.

Cheers, Nicolas.