Struct stdweb::web::HtmlElement
[−]
[src]
pub struct HtmlElement(_);
A reference to a JavaScript object which implements the IHtmlElement interface.
Trait Implementations
impl IEventTarget for HtmlElement
[src]
fn add_event_listener<T, F>(&self, listener: F) -> EventListenerHandle where
T: ConcreteEvent,
F: FnMut(T) + 'static,
T: ConcreteEvent,
F: FnMut(T) + 'static,
Adds given event handler to the list the list of event listeners for the specified EventTarget
on which it's called. Read more
impl INode for HtmlElement
[src]
fn append_child<T: INode>(&self, child: &T)
Adds a node to the end of the list of children of a specified parent node. Read more
fn remove_child<T: INode>(&self, child: &T) -> Result<(), NotFoundError>
Removes a child node from the DOM. Read more
fn clone_node(&self, kind: CloneKind) -> Self
Returns a duplicate of the node on which this method was called. Read more
fn contains<T: INode>(&self, node: &T) -> bool
Checks whenever a given node is a descendant of this one or not. Read more
fn insert_before<T: INode, U: INode>(&self, new_node: &T, reference_node: &U)
Inserts the specified node before the reference node as a child of the current node. Read more
fn replace_child<T: INode, U: INode>(&self, new_child: &T, old_child: &U)
Replaces one hild node of the specified node with another. Read more
fn parent_node(&self) -> Option<Node>
Returns the parent of this node in the DOM tree. Read more
fn first_child(&self) -> Option<Node>
Returns the node's first child in the tree, or None
if the node is childless. Read more
fn inner_text(&self) -> String
A property which represents the "rendered" text content of a node and its descendants. It approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied to the clipboard. Read more
fn text_content(&self) -> Option<String>
A property which represents the text content of a node and its descendants. Read more
fn set_text_content(&self, text: &str)
Sets the text content of this node; calling thil removes all of node's children and replaces them with a single text node with the given value. Read more
fn child_nodes(&self) -> NodeList
Returns a live collection of child nodes of this node. Read more
impl IElement for HtmlElement
[src]
fn class_list(&self) -> TokenList
The Element.classList is a read-only property which returns a live TokenList collection of the class attributes of the element. Read more
fn query_selector(&self, selector: &str) -> Option<Element>
Returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors. Read more
fn query_selector_all(&self, selector: &str) -> NodeList
Returns a non-live NodeList of all elements descended from the element on which it is invoked that matches the specified group of CSS selectors. Read more
impl IHtmlElement for HtmlElement
[src]
fn focus(&self)
Sets focus on the specified element, if it can be focused. Read more
fn blur(&self)
Removes keyboard focus from the current element. Read more
fn dataset(&self) -> StringMap
Allows access, both in reading and writing, to all of the custom data attributes (data-*) set on the element, either in HTML or in the DOM. Read more
impl Debug for HtmlElement
[src]
impl Clone for HtmlElement
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl AsRef<Reference> for HtmlElement
[src]
impl<T: TryInto<Reference>> TryFrom<T> for HtmlElement where
<T as TryInto<Reference>>::Error: Into<Box<Error>>,
[src]
<T as TryInto<Reference>>::Error: Into<Box<Error>>,
type Error = Box<Error>
The type returned in the event of a conversion error.
fn try_from(value: T) -> Result<Self, Self::Error>
Performs the conversion.
impl From<InputElement> for HtmlElement
[src]
fn from(value: InputElement) -> Self
Performs the conversion.