mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Allow element prefix to be set
Implements step 6.1.10 of https://dom.spec.whatwg.org/#concept-create-element
This commit is contained in:
parent
dd9bb0550b
commit
37e8b89377
6 changed files with 26 additions and 17 deletions
|
@ -152,7 +152,7 @@ impl HTMLCollection {
|
|||
}
|
||||
|
||||
fn match_element(elem: &Element, qualified_name: &LocalName) -> bool {
|
||||
match elem.prefix() {
|
||||
match elem.prefix().as_ref() {
|
||||
None => elem.local_name() == qualified_name,
|
||||
Some(prefix) => qualified_name.starts_with(&**prefix) &&
|
||||
qualified_name.find(":") == Some(prefix.len()) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue