w3c / DOM-Parsing

DOM Parsing and Serialization
https://w3c.github.io/DOM-Parsing/
Other
27 stars 14 forks source link

Improve definition of URL for Documents created by DOMParser #46

Closed Ms2ger closed 4 years ago

Ms2ger commented 5 years ago

The spec currently refers to the "active document", which is a property of a browsing context. However, it doesn't define which browsing context it's getting the "active document" from.

However, this doesn't appear to be the correct concept in the first place. Gecko, Chrome and WebKit all seem to use the URL of the relevant global's associated Document.

In particular, this difference is significant if the browsing context is navigated. In that case, the "active document" would change, and the spec would suggest using the URL the BC was navigated to. All browsers I tested use the pre-navigation URL instead.

Ms2ger commented 5 years ago

Tests: https://github.com/web-platform-tests/wpt/pull/15548

domenic commented 4 years ago

This is being done in https://github.com/whatwg/html/pull/5190