pub struct Tag {
pub tag: String,
pub dom_ref: JsValue,
pub dom_ref_as_node: Node,
pub dom_ref_as_element: Element,
}
Expand description
Generic HTML tag
Fields§
§tag: String
§dom_ref: JsValue
§dom_ref_as_node: Node
§dom_ref_as_element: Element
Implementations§
Trait Implementations§
Source§impl DomNode for Tag
impl DomNode for Tag
fn dom_ref_as_element(&self) -> &Element
fn set_attribute(&self, key: &str, value: &str)
fn remove_attribute(&self, key: &str)
Source§impl DomRef for Tag
impl DomRef for Tag
fn dom_ref_as_node(&self) -> &Node
fn dom_ref(&self) -> &JsValue
fn add_event_listener(&self, event_name: &str, cb: &dyn Callback)
fn remove_event_listener(&self, event_name: &str, cb: &dyn Callback)
fn append_child(&self, child: &dyn DomRef)
fn remove_child(&self, child: &dyn DomRef)
fn try_remove_child(&self, child: &dyn DomRef) -> Result<(), JsValue>
fn replace_child(&self, new_child: &dyn DomRef, old_child: &dyn DomRef)
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl !Send for Tag
impl !Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more