-
Notifications
You must be signed in to change notification settings - Fork 184
Description
For WebAssembly, I'm using WebIDL to specify the interface between WebAssembly and JavaScript in this PR. We're trying to avoid tying this into the Web Platform. One of the few ways that the current spec does tie into the Web is, to expose the interface to global objects, it uses [Exposed=(Window,Worker)].
What we really want for Wasm is for it to be exposed on all global objects. One aspect was accidentally omitting it on Worklets, but the bigger aspect is omitting it for everything that's not the web platform. For example, Node.js is likely to eventually enable Wasm support, and so the interface should be created on its global object as well.
I imagine that a version of Exposed which is everywhere might be useful for the Web Platform as well. APIs like TextEncoder which don't do any particular I/O wouldn't need a change each time another type of global object is added--they could be like new libraries added in the JavaScript standard.
What would you think about an additional extended attribute, or mode of using [Exposed], to support this case?