pub trait CustomElementFactory<W: CustomElementUpdater<V>, V: FromAnyValue + Send + Sync = ()>:
Send
+ Sync
+ 'static {
const NAME: &'static str;
const NAMESPACE: Option<&'static str> = None;
// Required method
fn create(dom: NodeMut<'_, V>) -> W;
}
Expand description
A factory for creating custom elements
Register with RealDom::register_custom_element_with_factory
Required Associated Constants§
Provided Associated Constants§
Required Methods§
Sourcefn create(dom: NodeMut<'_, V>) -> W
fn create(dom: NodeMut<'_, V>) -> W
Create a new element without mounting it.
The node passed in is the light DOM node. The element should not modify the light DOM node, but it can get the NodeMut::real_dom_mut
from the node to create new nodes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.