This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://xhr.spec.whatwg.org/#interface-xmlhttprequest This used to be in the worker spec but was removed at some point. The XHR spec needs to say something like [[ The XMLHttpRequest constructor must be exposed if the JavaScript global environment is a worker environment. ]] see e.g. http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workernavigator Similarly for all other interfaces you want to be exposed in workers defined in this spec.
Hmm, the WorkerNavigator example should probably be used for interfaces, while constructors should use [[ This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerGlobalScope interface. ]] see http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers-and-the-sharedworker-interface
What does "must be exposed" mean? Is that defined somewhere?
http://dev.w3.org/2006/webapi/WebIDL/#dfn-expose
Note that the HTML side of this is in flux (two checkins today; more possibly in the semi-near future).
I don't quite get why the XHR spec should say that XHR must be available in Workers. Shouldn't rather the Worker spec reference XHR and say that it must be made available? (There is currently no mention of XHR in http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html except that XMLHttpRequest is used in one of the demo scripts..)
No, we do not want to update the workers specification whenever a new API comes out. Instead, we should embrace workers as a first-class citizen. This'll be fixed soon once we have the [Global] and [ExposedBy] or whatever we call them annotations.
https://github.com/whatwg/xhr/commit/4d307f0a00301fbd147ed78f37428694b14cde08