pub trait IParentNode: ReferenceType {
// Provided methods
fn query_selector(
&self,
selector: &str,
) -> Result<Option<Element>, SyntaxError> { ... }
fn query_selector_all(
&self,
selector: &str,
) -> Result<NodeList, SyntaxError> { ... }
}
Expand description
The ParentNode
mixin contains methods and properties
that are common to all types of Node
objects that can
have children.
You most likely don’t want to use
this directly; instead
you should use stdweb::traits::*;
.
Provided Methods§
Sourcefn query_selector(&self, selector: &str) -> Result<Option<Element>, SyntaxError>
fn query_selector(&self, selector: &str) -> Result<Option<Element>, SyntaxError>
Returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors.
Sourcefn query_selector_all(&self, selector: &str) -> Result<NodeList, SyntaxError>
fn query_selector_all(&self, selector: &str) -> Result<NodeList, SyntaxError>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.