NEW305922
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
Attachments
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
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.