/// Create a VElement without a child.
Create a VElement without a child.
Create a VElement without a child .
pub fn childless(
        tag: &'static str,
        attributes: Vec<Attribute>,
        event_listeners: Vec<EventListener<RCTX>>,
    ) -> VElement<RCTX> {
        VElement {
            tag,
            attributes: Attributes::from(attributes),
            event_listeners: EventListeners(
                event_listeners
                    .into_iter()
                    .map(|listener| {
                        let listener: Box<
                            dyn EventManager<RenderContext = RCTX>,
                        > = Box::new(listener);
                        listener
                    })
                    .collect(),
            ),
            child: Box::new(VNode::None),
            node: None,
        }
    }
pub fn childless ( tag : & ' static str , attributes : Vec < Attribute > , event_listeners : Vec < EventListener < RCTX > > , ) -> VElement < RCTX > { VElement { tag , attributes : Attributes :: from ( attributes ) , event_listeners : EventListeners ( event_listeners . into_iter ( ) . map ( | listener | { let listener : Box < dyn EventManager < RenderContext = RCTX > , > = Box :: new ( listener ) ; listener } ) . collect ( ) , ) , child : Box :: new ( VNode :: None ) , node : None , } }
Create a VElement without a child.
Create a VElement without a child .
tag
&'static str
attributes
Vec<Attribute>
event_listeners
Vec<EventListener<RCTX>>