One attempt at figuring out the referrer source issue #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"script's referrer source" is no longer defined in HTML it seems (certainly not in the location it was according to the xrefs). I assume "API referrer source" is the equivalent concept (although I have not found any related discussion and it's not at all clear to me why the spec distinguishes between script's responsible document and its API referrer source as it does for example in step 4 here: http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#processing-model-7
In fact referrer source should always be referencing a Document when xhr.send() runs - by the algorithms over in the Worker spec and those in XHR itself - but the "API referrer source" definition says it can be a URL too, so it seems prudent to take that into account and put in ".. if it's a document, otherwise..".