Open Bug 931884 Opened 6 years ago Updated 1 year ago
Not sure where to affix a test so left that out for now.
Attachment #824203 - Flags: review?(bugs)
The best place for a test should be somewhere in imptests where we have the tests for specs, it is still a bit tricky to submit such tests to github and then get them to be updated in our tree, so mochitest in content/base/ or dom/tests should be ok.
Comment on attachment 824203 [details] [diff] [review] Impl Doesn't seem to do what the spec says http://dom.spec.whatwg.org/#dom-document-origin http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin
Attachment #824203 - Flags: review?(bugs) → review-
> Doesn't seem to do what the spec says drat! You're right! > http://dom.spec.whatwg.org/#dom-document-origin > http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0. > html#origin
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8530870 - Flags: review?(bugs) → review-
Attachment #8530870 - Attachment is obsolete: true
what's the status of this?
The status is that people were not happy with the spec for this when I posted an intent to implement, because document.origin is window-only, self.origin is worker-only, and the thing both contexts have is location.origin which is a completely nonsensical thing. So there was a lot of discussion about moving .origin to somewhere other than document (self?) for the window case... and then nothing happened. Anne, what's the story here? Seems like the spec still basically specs the thing which will cause everyone to write code that uses location.origin...
Flags: needinfo?(bzbarsky) → needinfo?(annevk)
Chrome implements document.origin. We could make it self.origin instead I suppose if we can convince Chrome that is worth the churn. Making location.origin magical still seems like a bad solution to me. Trying to get rid of location.origin also seems like something that is unlikely to succeed, but we could try?
Flags: needinfo?(annevk) → needinfo?(mike)
I think we should probably just do self.origin (in both window and worker) _and_ document.origin, give up on location.origin and just steer people away from it, and move on. The other question is whether we need to make any of these origin attributes on window/document/workerglobalscope unforgeable.
Sounds fine to me. I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=28801 on adding self.origin to HTML.
I rebased this on top of bug 1306170, because I figure we want that one for sure, but aren't sure about this one.
Attachment #8531041 - Attachment is obsolete: true
Blink just sent an intent to deprecate: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/CO52Bt15cuc so going to hold off on this for now.
You need to log in before you can comment on or make changes to this bug.