Support custom element callback reactions

This commit is contained in:
Connor Brewster 2017-06-21 14:40:34 -06:00
parent 596ed557d2
commit 4665991503
19 changed files with 314 additions and 252 deletions

View file

@ -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());