Say my html file is from http://foo.com/index.html, in it, there's a <script>
tag to http://bar.com/bar.js. In bar.js, I want to start a SharedWorker where the url is http://bar.com/worker.js. Is there a way to achieve this (maybe something like jsonp)?
This is a solution I found: