See https://github.com/whatwg/dom/pull/815 and https://github.com/web-platform-tests/wpt/pull/20995. https://github.com/whatwg/dom/issues/410 has context.
Do window-less documents, like those fetched by XHR or produced by XSLT, have a document.origin?
They used to, though what exactly that returned wasn't consistent (and also not really useful in any meaningful sense).
Looks like WebKit is the last engine to ship this.
Created attachment 386898 [details] Patch
Created attachment 386905 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Created attachment 386915 [details] Patch
ping review?
Comment on attachment 386915 [details] Patch r=me
Comment on attachment 386915 [details] Patch Clearing flags on attachment: 386915 Committed r254182: <https://trac.webkit.org/changeset/254182>
All reviewed patches have been landed. Closing bug.
<rdar://problem/58395584>