Track custom element state

This commit is contained in:
Connor Brewster 2017-08-01 12:20:31 -06:00
parent e700006fb2
commit 9f51c7df21
6 changed files with 59 additions and 21 deletions

View file

@ -81,7 +81,7 @@ use dom::bindings::js::Root;
use dom::bindings::utils::{DOM_PROTOTYPE_SLOT, ProtoOrIfaceArray, get_proto_or_iface_array};
use dom::create::create_native_html_element;
use dom::customelementregistry::ConstructionStackEntry;
use dom::element::{Element, ElementCreator};
use dom::element::{CustomElementState, Element, ElementCreator};
use dom::htmlelement::HTMLElement;
use dom::window::Window;
use html5ever::LocalName;
@ -296,8 +296,10 @@ pub unsafe fn html_constructor<T>(window: &Window, call_args: &CallArgs) -> Fall
// Step 8.2 is performed in the generated caller code.
// TODO: Step 8.3 - 8.4
// Set the element's custom element state and definition.
// Step 8.3
element.set_custom_element_state(CustomElementState::Custom);
// Step 8.4
element.set_custom_element_definition(definition.clone());
// Step 8.5