Struct script::dom::customelementregistry::CustomElementRegistry
source · #[repr(C)]pub struct CustomElementRegistry {
reflector_: Reflector,
window: Dom<Window>,
when_defined: DomRefCell<HashMap<LocalName, Rc<Promise>>>,
element_definition_is_running: Cell<bool>,
definitions: DomRefCell<HashMap<LocalName, Rc<CustomElementDefinition>>>,
}
Expand description
Fields
reflector_: Reflector
window: Dom<Window>
when_defined: DomRefCell<HashMap<LocalName, Rc<Promise>>>
element_definition_is_running: Cell<bool>
definitions: DomRefCell<HashMap<LocalName, Rc<CustomElementDefinition>>>
Implementations
sourceimpl CustomElementRegistry
impl CustomElementRegistry
fn __assert_parent_type(&self)
sourceimpl CustomElementRegistry
impl CustomElementRegistry
fn new_inherited(window: &Window) -> CustomElementRegistry
pub fn new(window: &Window) -> Root<Dom<CustomElementRegistry>>
sourcepub fn teardown(&self)
pub fn teardown(&self)
Cleans up any active promises https://github.com/servo/servo/issues/15318
sourcepub fn lookup_definition(
&self,
local_name: &LocalName,
is: Option<&LocalName>
) -> Option<Rc<CustomElementDefinition>>
pub fn lookup_definition(
&self,
local_name: &LocalName,
is: Option<&LocalName>
) -> Option<Rc<CustomElementDefinition>>
pub fn lookup_definition_by_constructor(
&self,
constructor: HandleObject<'_>
) -> Option<Rc<CustomElementDefinition>>
sourcefn check_prototype(
&self,
constructor: HandleObject<'_>,
prototype: MutableHandleValue<'_>
) -> Result<(), Error>
fn check_prototype(
&self,
constructor: HandleObject<'_>,
prototype: MutableHandleValue<'_>
) -> Result<(), Error>
sourceunsafe fn get_callbacks(
&self,
prototype: HandleObject<'_>
) -> Result<LifecycleCallbacks, Error>
unsafe fn get_callbacks(
&self,
prototype: HandleObject<'_>
) -> Result<LifecycleCallbacks, Error>
sourcefn get_observed_attributes(
&self,
constructor: HandleObject<'_>
) -> Result<Vec<DOMString>, Error>
fn get_observed_attributes(
&self,
constructor: HandleObject<'_>
) -> Result<Vec<DOMString>, Error>
Trait Implementations
sourceimpl CustomElementRegistryMethods for CustomElementRegistry
impl CustomElementRegistryMethods for CustomElementRegistry
sourceimpl DomObject for CustomElementRegistry
impl DomObject for CustomElementRegistry
sourceimpl DomObjectWrap for CustomElementRegistry
impl DomObjectWrap for CustomElementRegistry
sourceconst WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistryBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::customelementregistry::CustomElementRegistry>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::customelementregistry::CustomElementRegistry>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistryBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::customelementregistry::CustomElementRegistry>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::customelementregistry::CustomElementRegistry>>}
Function pointer to the general wrap function type
sourceimpl HasParent for CustomElementRegistry
impl HasParent for CustomElementRegistry
sourceimpl IDLInterface for CustomElementRegistry
impl IDLInterface for CustomElementRegistry
sourceimpl JSTraceable for CustomElementRegistry
impl JSTraceable for CustomElementRegistry
sourceimpl MallocSizeOf for CustomElementRegistry
impl MallocSizeOf for CustomElementRegistry
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself. Read more
sourceimpl MutDomObject for CustomElementRegistry
impl MutDomObject for CustomElementRegistry
sourceunsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
sourceimpl PartialEq<CustomElementRegistry> for CustomElementRegistry
impl PartialEq<CustomElementRegistry> for CustomElementRegistry
sourcefn eq(&self, other: &CustomElementRegistry) -> bool
fn eq(&self, other: &CustomElementRegistry) -> bool
sourceimpl ToJSValConvertible for CustomElementRegistry
impl ToJSValConvertible for CustomElementRegistry
sourceunsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
Convert
self
to a JSVal
. JSAPI failure causes a panic.Auto Trait Implementations
impl !RefUnwindSafe for CustomElementRegistry
impl !Send for CustomElementRegistry
impl !Sync for CustomElementRegistry
impl Unpin for CustomElementRegistry
impl !UnwindSafe for CustomElementRegistry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert