mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support custom element callback reactions
This commit is contained in:
parent
596ed557d2
commit
4665991503
19 changed files with 314 additions and 252 deletions
|
@ -131,7 +131,10 @@ fn create_html_element(name: QualName,
|
|||
CustomElementCreationMode::Synchronous => {
|
||||
let local_name = name.local.clone();
|
||||
return match definition.create_element(document, prefix.clone()) {
|
||||
Ok(element) => element,
|
||||
Ok(element) => {
|
||||
element.set_custom_element_definition(definition.clone());
|
||||
element
|
||||
},
|
||||
Err(error) => {
|
||||
// Step 6. Recovering from exception.
|
||||
let global = GlobalScope::current().unwrap_or_else(|| document.global());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue