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§

source

const NAME: &'static str

The tag of the element

Provided Associated Constants§

source

const NAMESPACE: Option<&'static str> = None

The namespace of the element

Required Methods§

source

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.

Implementors§

source§

impl<W: CustomElement<V>, V: FromAnyValue + Send + Sync> CustomElementFactory<W, V> for W

source§

const NAME: &'static str = W::NAME

source§

const NAMESPACE: Option<&'static str> = W::NAMESPACE