webgcode icon indicating copy to clipboard operation
webgcode copied to clipboard

Chrome blocks Workers

Open jalovisko opened this issue 3 years ago • 1 comments

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.

jalovisko avatar Jun 14 '21 20:06 jalovisko

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

Cheers, Nicolas.

nraynaud avatar Jun 16 '21 08:06 nraynaud