Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIncorrect Document can be used when creating elements during parsing #18277
Labels
Comments
This was referenced Sep 17, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 1 of https://html.spec.whatwg.org/multipage/#create-an-element-for-the-token states that the intended parent's node document should be used when creating a new element during parsing.
We currently use the document that is associated with the parser. (line 795)
servo/components/script/dom/servoparser/mod.rs
Lines 787 to 804 in 96b4e06
This causes issues when creating an element that is supposed to be inside a
template'scontentsbecausecontentshas a different document than thetemplate.