Copied from WHATWG bug 18860:
When doing XHR/EventSource/importScript fetches from a Worker or SharedWorker,
the referrer shouldn't be some document, but rather the URL of the worker
itself. Same thing if a worker creates a sub worker.
This is similar to how the referrer of a background image linked to from a CSS
stylesheet is the URL of the stylesheet, not the URL of a html Document.
Will get fixed with
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
Rationale: accepted WHATWG change