pub struct DomElement { /* private fields */ }Expand description
A Real DOM representative - element kind
Implementations§
Source§impl DomElement
impl DomElement
pub fn new(name: impl Into<StaticString>) -> Self
pub fn add_attr( &self, name: impl Into<StaticString>, value: impl Into<AttrValue>, )
pub fn add_attr_group( self, values: impl IntoIterator<Item = (impl Into<String>, impl Into<AttrGroupValue>)>, ) -> Self
pub fn add_attr_group_item(self, key: String, value: AttrGroupValue) -> Self
pub fn add_child(&self, child_node: impl Into<DomNode>)
pub fn add_child_text(&self, text: impl Into<String>)
pub fn attr( self, name: impl Into<StaticString>, value: impl Into<AttrValue>, ) -> Self
pub fn attrs<T: Into<AttrValue>>( self, attrs: Vec<(impl Into<StaticString>, T)>, ) -> Self
pub fn child(self, child_node: impl Into<DomNode>) -> Self
pub fn child_text(self, text: impl Into<String>) -> Self
pub fn children<C: Into<DomNode>>(self, children: Vec<C>) -> Self
pub fn css(self, css: impl Into<CssAttrValue>) -> Self
pub fn css_with_class_name( self, css: impl Into<CssAttrValue>, debug_class_name: Option<String>, ) -> Self
pub fn get_ref(&self) -> DomElementRef
pub fn hook_key_down( self, on_hook_key_down: impl Into<Callback1<KeyDownEvent, bool>>, ) -> Self
pub fn hook_key_down_rc( self, on_hook_key_down: Rc<Callback1<KeyDownEvent, bool>>, ) -> Self
pub fn id_dom(&self) -> DomId
pub fn on_blur(self, on_blur: impl Into<Callback<()>>) -> Self
pub fn on_blur_rc(self, on_blur: Rc<Callback<()>>) -> Self
pub fn on_change(self, on_change: impl Into<Callback1<String, ()>>) -> Self
pub fn on_change_rc(self, on_change: Rc<Callback1<String, ()>>) -> Self
pub fn on_click(self, on_click: impl Into<Callback1<ClickEvent, ()>>) -> Self
pub fn on_click_rc(self, on_click: Rc<Callback1<ClickEvent, ()>>) -> Self
pub fn on_dropfile( self, on_dropfile: impl Into<Callback1<DropFileEvent, ()>>, ) -> Self
pub fn on_dropfile_rc( self, on_dropfile: Rc<Callback1<DropFileEvent, ()>>, ) -> Self
pub fn on_input(self, on_input: impl Into<Callback1<String, ()>>) -> Self
pub fn on_input_rc(self, on_input: Rc<Callback1<String, ()>>) -> Self
pub fn on_key_down( self, on_key_down: impl Into<Callback1<KeyDownEvent, bool>>, ) -> Self
pub fn on_key_down_rc( self, on_key_down: Rc<Callback1<KeyDownEvent, bool>>, ) -> Self
pub fn on_load(self, on_load: impl Into<Callback<()>>) -> Self
pub fn on_load_rc(self, on_load: Rc<Callback<()>>) -> Self
pub fn on_mouse_down(self, on_mouse_down: impl Into<Callback<bool>>) -> Self
pub fn on_mouse_down_rc(self, on_mouse_down: Rc<Callback<bool>>) -> Self
pub fn on_mouse_enter(self, on_mouse_enter: impl Into<Callback<()>>) -> Self
pub fn on_mouse_enter_rc(self, on_mouse_enter: Rc<Callback<()>>) -> Self
pub fn on_mouse_leave(self, on_mouse_leave: impl Into<Callback<()>>) -> Self
pub fn on_mouse_leave_rc(self, on_mouse_leave: Rc<Callback<()>>) -> Self
pub fn on_mouse_up(self, on_mouse_up: impl Into<Callback<bool>>) -> Self
pub fn on_mouse_up_rc(self, on_mouse_up: Rc<Callback<bool>>) -> Self
pub fn on_submit(self, on_submit: impl Into<Callback<()>>) -> Self
pub fn on_submit_rc(self, on_submit: Rc<Callback<()>>) -> Self
Trait Implementations§
Source§impl Drop for DomElement
impl Drop for DomElement
Source§impl From<DomElement> for DomNode
impl From<DomElement> for DomNode
Source§fn from(node: DomElement) -> Self
fn from(node: DomElement) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for DomElement
impl !RefUnwindSafe for DomElement
impl !Send for DomElement
impl !Sync for DomElement
impl Unpin for DomElement
impl !UnwindSafe for DomElement
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