pub trait CustomElementRegistryMethods<D: DomTypes> {
// Required methods
fn Define(
&self,
cx: &mut JSContext,
name: DOMString,
constructor_: Rc<CustomElementConstructor<D>>,
options: &ElementDefinitionOptions,
) -> Fallible<()>;
fn Get(
&self,
cx: &mut JSContext,
name: DOMString,
rval: MutableHandle<'_, Value>,
);
fn GetName(
&self,
constructor: Rc<CustomElementConstructor<D>>,
) -> Option<DOMString>;
fn WhenDefined(
&self,
realm: &mut CurrentRealm<'_>,
name: DOMString,
) -> Rc<D::Promise>;
fn Upgrade(&self, cx: &NoGC, root: &D::Node);
fn Initialize(&self, root: &D::Node) -> Fallible<()>;
fn Constructor(
cx: &mut JSContext,
global: &D::Window,
proto: Option<HandleObject<'_>>,
) -> DomRoot<D::CustomElementRegistry>;
}Required Methods§
fn Define( &self, cx: &mut JSContext, name: DOMString, constructor_: Rc<CustomElementConstructor<D>>, options: &ElementDefinitionOptions, ) -> Fallible<()>
fn Get( &self, cx: &mut JSContext, name: DOMString, rval: MutableHandle<'_, Value>, )
fn GetName( &self, constructor: Rc<CustomElementConstructor<D>>, ) -> Option<DOMString>
fn WhenDefined( &self, realm: &mut CurrentRealm<'_>, name: DOMString, ) -> Rc<D::Promise>
fn Upgrade(&self, cx: &NoGC, root: &D::Node)
fn Initialize(&self, root: &D::Node) -> Fallible<()>
fn Constructor( cx: &mut JSContext, global: &D::Window, proto: Option<HandleObject<'_>>, ) -> DomRoot<D::CustomElementRegistry>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".