mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
apply is: to Document.createElement even when name isn't registered yet
This commit is contained in:
parent
3e77a0ae09
commit
14d278ff1c
6 changed files with 37 additions and 244 deletions
|
@ -189,14 +189,21 @@ fn create_html_element(
|
|||
}
|
||||
}
|
||||
|
||||
// Steps 7.1-7.2
|
||||
// Steps 7.1-7.3
|
||||
let result = create_native_html_element(name.clone(), prefix, document, creator);
|
||||
match is {
|
||||
Some(is) => {
|
||||
result.set_is(is);
|
||||
result.set_custom_element_state(CustomElementState::Undefined);
|
||||
},
|
||||
None => {
|
||||
if is_valid_custom_element_name(&*name.local) {
|
||||
result.set_custom_element_state(CustomElementState::Undefined);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Step 7.3
|
||||
if is_valid_custom_element_name(&*name.local) || is.is_some() {
|
||||
result.set_custom_element_state(CustomElementState::Undefined);
|
||||
}
|
||||
|
||||
// Step 8
|
||||
result
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue