Implement Location.ancestorOrigins
Categories
(Core :: DOM: Window and Location, enhancement, P3)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: erik, Unassigned)
References
(Blocks 1 open bug, )
Details
(6 keywords, Whiteboard: [domcore-bugbash-triaged])
User Story
user-impact-score:160
Attachments
(2 files)
11.62 KB,
patch
|
Details | Diff | Splinter Review | |
4.78 KB,
patch
|
Details | Diff | Splinter Review |
Comment 1•11 years ago
|
||
![]() |
||
Comment 2•11 years ago
|
||
![]() |
||
Updated•11 years ago
|
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Reporter | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Reporter | ||
Comment 8•10 years ago
|
||
![]() |
||
Comment 10•10 years ago
|
||
![]() |
||
Comment 11•10 years ago
|
||
![]() |
||
Comment 12•10 years ago
|
||
![]() |
||
Comment 13•10 years ago
|
||
![]() |
||
Comment 14•10 years ago
|
||
Reporter | ||
Comment 15•10 years ago
|
||
![]() |
||
Comment 16•10 years ago
|
||
Reporter | ||
Comment 17•10 years ago
|
||
Comment 19•10 years ago
|
||
Reporter | ||
Comment 20•10 years ago
|
||
Updated•10 years ago
|
Comment 21•10 years ago
|
||
Reporter | ||
Comment 22•9 years ago
|
||
![]() |
||
Comment 23•9 years ago
|
||
Updated•7 years ago
|
Comment 24•7 years ago
|
||
FWIW, https://github.com/whatwg/html/pull/2480 has a proposal for a revised specification and https://github.com/web-platform-tests/wpt/pull/5402 has tests. (They are about a year old, might need rebasing. Happy to help if we prioritize this.)
Updated•6 years ago
|
Updated•6 years ago
|
Comment 25•5 years ago
|
||
Anne, do we want to implement this?
kmag says this should be easy to implement because we have WebExtension code that implements something similar.
Comment 26•5 years ago
|
||
We discussed this feature in the privacy team as it came up at https://github.com/privacycg/storage-partitioning/issues/14 as well. bz's concern about passive trackers is very much alive so we would have to mitigate that if we were to expose this. In particular, if there's no passive way (referrer) for an embedded site to know its parent, this should not reveal the parent to an embedded site.
If we apply that strictly, this would tell you at most about your parent and the only information you would get about further ancestors is how many there are.
This is even further complicated when an embedded site is navigated as the site being navigated to would never know about its parent (other than that one exists).
I'm not sure if that meets the use cases you envision for this feature.
(The HTML Standard PR doesn't account for some of these considerations and would have to be redone, if we were to pursue this further.)
Comment 27•5 years ago
|
||
From the webcompat side of things, PG Slots is (accidentally?) treating location.ancestorOrigins
as though it exists, but may be zero-length. This seems to just be a coding oversight, as they have fallback code which is just not correctly being falled-back-upon. Thankfully this seems to be a one-off case rather than an obviously-shared code snippet circulating online.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
![]() |
||
Updated•4 years ago
|
Comment 28•3 years ago
|
||
WebCompat P3, but we'll bump it higher if we see more critical breakage in the wild.
Comment 29•3 years ago
|
||
Really interested in having this feature in Firefox too. Looking forward to it!
I hope P3 means soon : )
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 30•1 year ago
|
||
While the standards position is still open, there aren't blocking spec issues. Removing the keyword spec-needed.
Comment 31•1 year ago
|
||
I have a work-in-progress patch for this which I will attach to the bug after I've had a moment to rebase it.
I think we'll want to consider whether to really expose all origins. Brave is also considering that: https://github.com/brave/brave-browser/issues/33671
Comment 32•1 year ago
•
|
||
In our triage meeting today I missed Comment 23, which indicates that https://github.com/whatwg/html/issues/1918 is a blocker (and there's a PR at https://github.com/whatwg/html/pull/2480 but it looks like it stalled in 2017 or 2018). (I was going to add back the spec-needed
keyword but it was still set.)
Updated•1 year ago
|
Comment hidden (advocacy) |
Comment hidden (advocacy) |
Comment 35•10 months ago
|
||
(In reply to Simon Pieters [:zcorpan] from comment #32)
In our triage meeting today I missed Comment 23, which indicates that https://github.com/whatwg/html/issues/1918 is a blocker (and there's a PR at https://github.com/whatwg/html/pull/2480 but it looks like it stalled in 2017 or 2018). (I was going to add back the
spec-needed
keyword but it was still set.)
Adding webcompat:blocked according to comment 32.
Updated•10 months ago
|
Comment 36•6 months ago
|
||
I found this by looking over an issue with Windows Admin Center (ref: https://github.com/MicrosoftDocs/Windows-Admin-Center-Ideas-and-Feedback/issues/290) where people have discovered that, in that particular case, it can be worked around by either returning an empty array, or by returning the window.location.origin
, to the code that tries to utilise the ancestorOrigin
object.
Could we potentially, until the situation with the spec and privacy concerns is resolved, use one of these within Firefox to prevent issues where third-party code tries to use the object but has no fallbacks like the Windows Admin Center?
References for people's attempts to hack the Windows Admin Center's code on each WAC installation showing how we might be able to get some third-party apps and sites running again if we did something similar within Firefox directly:
- https://github.com/MicrosoftDocs/Windows-Admin-Center-Ideas-and-Feedback/issues/290#issuecomment-2599677400
- https://github.com/HerdHeaven/Admin-Scripts/blob/main/Add-FFSupportToWindowsAdminCenter.ps1 (from https://github.com/MicrosoftDocs/Windows-Admin-Center-Ideas-and-Feedback/issues/290#issuecomment-2608238396)
Comment 37•6 months ago
•
|
||
Returning an empty array could work only for top-level frames as an empty window.location.ancestorOrigins
could be used as clue no valid ancestor frames are present for subframes.
Returning an array with one or more window.location.origin
would only work if the whole frame subtree is same-origin. Otherwise false information would be given to frames.
In all other scenarios it seems best to keep window.location.ancestorOrigins
undefined until an implementation is ready and supported.
Comment 38•1 month ago
|
||
I've got a working example at https://github.com/theIDinside/firefox/tree/location-ancestor-origins-list - and I intend to also add the newer version of the spec that's being worked on by :zcorpan, today. Is it ok if nick this bug?
Comment 39•1 month ago
|
||
(In reply to Simon Farre [:sfarre] from comment #38)
I've got a working example at https://github.com/theIDinside/firefox/tree/location-ancestor-origins-list - and I intend to also add the newer version of the spec that's being worked on by :zcorpan, today. Is it ok if nick this bug?
Thank you, Simon, for your interest in helping with this. It sounds good to me. :) However, I think it would be worth needinfo-ing Tom, given that he mentioned he had WIPs in comment 31.
Comment 40•1 month ago
|
||
Sure, feel free to grab this bug, Simon. Thanks!
Comment 41•1 month ago
|
||
Thank you :hsinyi! And cool :twisniewski!
I have new tests written for the spec in it's current form (found at https://github.com/whatwg/html/pull/11560, which might be subject to minor changes). I do wonder who would/should be the reviewer for the patch?
Comment 42•29 days ago
|
||
(In reply to Simon Farre [:sfarre] from comment #41)
Thank you :hsinyi! And cool :twisniewski!
I have new tests written for the spec in it's current form (found at https://github.com/whatwg/html/pull/11560, which might be subject to minor changes). I do wonder who would/should be the reviewer for the patch?
If it's new web platform tests, I believe :zcorpan can help.
Updated•17 days ago
|
Description
•