mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Add custom elements related stuff into ElementRareData
This commit is contained in:
parent
a9019da39d
commit
c75da615bd
5 changed files with 54 additions and 34 deletions
|
@ -23,7 +23,7 @@ use crate::dom::bindings::root::{Dom, DomRoot};
|
|||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::domexception::{DOMErrorName, DOMException};
|
||||
use crate::dom::element::{CustomElementState, Element};
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::{document_from_node, window_from_node, Node, ShadowIncluding};
|
||||
|
@ -47,6 +47,21 @@ use std::ops::Deref;
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#concept-element-custom-element-state>
|
||||
#[derive(Clone, Copy, Eq, JSTraceable, MallocSizeOf, PartialEq)]
|
||||
pub enum CustomElementState {
|
||||
Undefined,
|
||||
Failed,
|
||||
Uncustomized,
|
||||
Custom,
|
||||
}
|
||||
|
||||
impl Default for CustomElementState {
|
||||
fn default() -> CustomElementState {
|
||||
CustomElementState::Uncustomized
|
||||
}
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#customelementregistry>
|
||||
#[dom_struct]
|
||||
pub struct CustomElementRegistry {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue