Re: [whatwg/fetch] Adds "audioworklet" and "paintworklet" as destinations. (#527)

I think there's been some confusion in this thread... each `addModule` call _doesn't_ create a new global.

There is at least 1 global which is tied to the document. Each `addModule` call just invokes the code in that global.

worklets are already "same-origin" in that sense (they are created from their owning document). You can load cross-origin code in that global. (Exactly the same as the main window global in some sense).  @nhiroki 's example with a cross-origin script shows this, (this is important for the library embedding case we expect for most things to use). 

Mike's understanding of
> worklets is that they're basically scripts executing in the same origin as the document (basically weirdly-behaved <script> elements).

 is correct.

@wanderview Does that make sense?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/527#issuecomment-335677387

Received on Wednesday, 11 October 2017 04:18:07 UTC