Summary: self.origin returns the Unicode serialization of the origin of
the settings object of the global represented by "self" (a Window or
WorkerGlobalScope). This gives scripts a consistent way of getting
their origin in both situations. Note that unlike location.origin this
represents the actual origin of the global, not the origin of the URL
it's loaded from. The difference can be substantial in the case of
sandboxing, for example.
In the window case, this returns the same thing as self.document.origin
if document.origin is also implemented.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1306170
Spec: https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin
Platfrom coverage: All
Estimated release: 54
Preference: none.
Devtools bug: None needed, I think.
Status in other implementations: no one else implements this yet. I am
not aware of either WebKit or Blink bugs to implement this either. I
just filed https://bugs.webkit.org/show_bug.cgi?id=168023 and
https://bugs.chromium.org/p/chromium/issues/detail?id=690195 bug have no
idea whether they will actually pick them up.
Tests: I will make sure there are some. ;)
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform