Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve definition of URL for Documents created by DOMParser #46

Closed
Ms2ger opened this issue Feb 25, 2019 · 2 comments
Closed

Improve definition of URL for Documents created by DOMParser #46

Ms2ger opened this issue Feb 25, 2019 · 2 comments
Assignees

Comments

@Ms2ger
Copy link

Ms2ger commented Feb 25, 2019

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
Copy link
Author

Ms2ger commented Feb 25, 2019

Tests: web-platform-tests/wpt#15548

domenic added a commit to whatwg/html that referenced this issue Jan 4, 2020
This moves the DOMParser class from https://w3c.github.io/DOM-Parsing/
into HTML, per various offline discussions. Along the way, it improves
the spec in several minor ways and a couple notable ways:

* It precisely defines the URL of the resulting document, in a way that
  matches the majority of browsers. As such, this closes
  w3c/DOM-Parsing#46.
* It more clearly states how the parser error documents are created,
  namely that they also get their content type and URL set.
@domenic domenic self-assigned this Jan 4, 2020
@domenic
Copy link
Collaborator

domenic commented Jan 4, 2020

This is being done in whatwg/html#5190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants