Bug 305922
| Summary: | location.ancestorOrigins should return a new value every time | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, annevk, cdumez, karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://wpt.live/html/browsers/history/the-location-interface/location-ancestor-origins-inactive-document.sub.html | ||
Simon Pieters (:zcorpan)
See https://github.com/whatwg/html/pull/12071
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
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)
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
<rdar://problem/169097730>
Ahmad Saleem
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
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.