WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
305922
location.ancestorOrigins should return a new value every time
https://bugs.webkit.org/show_bug.cgi?id=305922
Summary
location.ancestorOrigins should return a new value every time
Simon Pieters (:zcorpan)
Reported
2026-01-21 08:11:38 PST
See
https://github.com/whatwg/html/pull/12071
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2026-01-21 17:32:56 PST
Thank you for the report! We can probably figure it out with more effort, but from a cursory glance at the issue, I'm not sure which exact aspect of the discussion this bug covers. Would you mind clarifying? A test case would be ideal, of course.
Simon Pieters (:zcorpan)
Comment 2
2026-01-22 00:18:02 PST
This is mainly about removing `[SameObject, CachedAttribute]` so that a new `DOMTokenList` object is returned every time. The spec says to compute the list when a `Document` is created, but without the `referrerpolicy` change I think it's not observable if it's computed lazily. (You can still cache the underlying array, so long as you return a new `DOMTokenList` every time and make sure to return an empty list when the document is not active.) Tests are linked from the spec PR.
Radar WebKit Bug Importer
Comment 3
2026-01-28 08:12:12 PST
<
rdar://problem/169097730
>
Ahmad Saleem
Comment 4
2026-01-28 10:47:55 PST
Test Case -
https://wpt.fyi/results/html/browsers/history/the-location-interface/location-ancestor-origins-inactive-document.sub.html?label=experimental&label=master&aligned
Live Link -
https://wpt.live/html/browsers/history/the-location-interface/location-ancestor-origins-inactive-document.sub.html
Anne van Kesteren
Comment 5
2026-01-30 02:05:49 PST
Note that I left feedback on the PR. Returning a new object for getter each time it is invoked would be a very surprising behavior and go against API design guidelines. There might well be something we have to change, but what exactly isn't clear yet.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug