pub struct VirtualElement<Handle>where
Handle: RealDom,{
pub tag: String,
pub attrs: HashMap<String, AttributeValue>,
pub events: Events<Handle>,
pub children: Vec<VirtualNode<Handle>>,
pub special_attributes: SpecialAttributes,
}Fields§
§tag: StringThe HTML tag, such as “div”
attrs: HashMap<String, AttributeValue>HTML attributes such as id, class, style, etc
events: Events<Handle>Events that will get added to your real DOM element via .addEventListener
Events natively handled in HTML such as onclick, onchange, oninput and others
can be found in [VElement.known_events]
children: Vec<VirtualNode<Handle>>The children of this VirtualNode. So a
special_attributes: SpecialAttributesImplementations§
Source§impl<Handle> VirtualElement<Handle>where
Handle: RealDom,
impl<Handle> VirtualElement<Handle>where
Handle: RealDom,
pub fn new(tag: impl Into<String>) -> VirtualElement<Handle>
Trait Implementations§
Source§impl<Handle> Debug for VirtualElement<Handle>where
Handle: RealDom,
impl<Handle> Debug for VirtualElement<Handle>where
Handle: RealDom,
Source§impl<Handle> Display for VirtualElement<Handle>where
Handle: RealDom,
impl<Handle> Display for VirtualElement<Handle>where
Handle: RealDom,
Source§impl<Dom> From<VirtualElement<Dom>> for VirtualNode<Dom>where
Dom: RealDom,
impl<Dom> From<VirtualElement<Dom>> for VirtualNode<Dom>where
Dom: RealDom,
Source§fn from(other: VirtualElement<Dom>) -> VirtualNode<Dom>
fn from(other: VirtualElement<Dom>) -> VirtualNode<Dom>
Converts to this type from the input type.
Auto Trait Implementations§
impl<Handle> !Freeze for VirtualElement<Handle>
impl<Handle> !RefUnwindSafe for VirtualElement<Handle>
impl<Handle> !Send for VirtualElement<Handle>
impl<Handle> !Sync for VirtualElement<Handle>
impl<Handle> !UnwindSafe for VirtualElement<Handle>
impl<Handle> Unpin for VirtualElement<Handle>
impl<Handle> UnsafeUnpin for VirtualElement<Handle>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more