Struct script::dom::customelementregistry::CustomElementRegistry
source · #[repr(C)]pub struct CustomElementRegistry {
reflector_: Reflector,
window: Dom<Window>,
when_defined: DomRefCell<HashMapTracedValues<LocalName, Rc<Promise>>>,
element_definition_is_running: Cell<bool>,
definitions: DomRefCell<HashMapTracedValues<LocalName, Rc<CustomElementDefinition>>>,
}
Expand description
Fields§
§reflector_: Reflector
§window: Dom<Window>
§when_defined: DomRefCell<HashMapTracedValues<LocalName, Rc<Promise>>>
§element_definition_is_running: Cell<bool>
§definitions: DomRefCell<HashMapTracedValues<LocalName, Rc<CustomElementDefinition>>>
Implementations§
source§impl CustomElementRegistry
impl CustomElementRegistry
fn __assert_parent_type(&self)
source§impl 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§
source§impl CustomElementRegistryMethods for CustomElementRegistry
impl CustomElementRegistryMethods for CustomElementRegistry
source§impl DomObject for CustomElementRegistry
impl DomObject for CustomElementRegistry
source§impl DomObjectWrap for CustomElementRegistry
impl DomObjectWrap for CustomElementRegistry
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistry_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::customelementregistry::CustomElementRegistry>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::customelementregistry::CustomElementRegistry>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistry_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, 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
source§impl HasParent for CustomElementRegistry
impl HasParent for CustomElementRegistry
source§impl IDLInterface for CustomElementRegistry
impl IDLInterface for CustomElementRegistry
source§impl MallocSizeOf for CustomElementRegistry
impl MallocSizeOf for CustomElementRegistry
source§fn 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.
source§impl MutDomObject for CustomElementRegistry
impl MutDomObject for CustomElementRegistry
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<CustomElementRegistry> for CustomElementRegistry
impl PartialEq<CustomElementRegistry> for CustomElementRegistry
source§fn eq(&self, other: &CustomElementRegistry) -> bool
fn eq(&self, other: &CustomElementRegistry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert