ShadowRoot

Struct ShadowRoot 

Source
pub struct ShadowRoot { /* private fields */ }
Expand description

The ShadowRoot class.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot

Implementations§

Source§

impl ShadowRoot

Source

pub fn mode(&self) -> ShadowRootMode

Getter for the mode field of this object.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot, ShadowRootMode

Source§

impl ShadowRoot

Source

pub fn host(&self) -> Element

Getter for the host field of this object.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn inner_html(&self) -> String

Getter for the innerHTML field of this object.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot

Source§

impl ShadowRoot

Source

pub fn set_inner_html(&self, value: &str)

Setter for the innerHTML field of this object.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot

Source§

impl ShadowRoot

Source

pub fn active_element(&self) -> Option<Element>

Getter for the activeElement field of this object.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn style_sheets(&self) -> StyleSheetList

Getter for the styleSheets field of this object.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot, StyleSheetList

Source§

impl ShadowRoot

Source

pub fn pointer_lock_element(&self) -> Option<Element>

Getter for the pointerLockElement field of this object.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn fullscreen_element(&self) -> Option<Element>

Getter for the fullscreenElement field of this object.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn picture_in_picture_element(&self) -> Option<Element>

Getter for the pictureInPictureElement field of this object.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl ShadowRoot

Source

pub fn get_element_by_id(&self, element_id: &str) -> Option<Element>

The getElementById() method.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn get_elements_by_class_name(&self, class_names: &str) -> HtmlCollection

The getElementsByClassName() method.

MDN Documentation

This API requires the following crate features to be activated: HtmlCollection, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn get_elements_by_tag_name(&self, local_name: &str) -> HtmlCollection

The getElementsByTagName() method.

MDN Documentation

This API requires the following crate features to be activated: HtmlCollection, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn get_elements_by_tag_name_ns( &self, namespace: Option<&str>, local_name: &str, ) -> HtmlCollection

The getElementsByTagNameNS() method.

MDN Documentation

This API requires the following crate features to be activated: HtmlCollection, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn element_from_point(&self, x: f32, y: f32) -> Option<Element>

The elementFromPoint() method.

MDN Documentation

This API requires the following crate features to be activated: Element, ShadowRoot

Source§

impl ShadowRoot

Source

pub fn elements_from_point(&self, x: f32, y: f32) -> Array

The elementsFromPoint() method.

MDN Documentation

This API requires the following crate features to be activated: ShadowRoot

Methods from Deref<Target = DocumentFragment>§

Source

pub fn children(&self) -> HtmlCollection

Getter for the children field of this object.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, HtmlCollection

Source

pub fn first_element_child(&self) -> Option<Element>

Getter for the firstElementChild field of this object.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Element

Source

pub fn last_element_child(&self) -> Option<Element>

Getter for the lastElementChild field of this object.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Element

Source

pub fn child_element_count(&self) -> u32

Getter for the childElementCount field of this object.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn get_element_by_id(&self, element_id: &str) -> Option<Element>

The getElementById() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Element

Source

pub fn query_selector( &self, selectors: &str, ) -> Result<Option<Element>, JsValue>

The querySelector() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Element

Source

pub fn query_selector_all(&self, selectors: &str) -> Result<NodeList, JsValue>

The querySelectorAll() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, NodeList

Source

pub fn append_with_node(&self, nodes: &Array) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_0(&self) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_1(&self, nodes_1: &Node) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_2( &self, nodes_1: &Node, nodes_2: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_3( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_4( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_5( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_6( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, nodes_6: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_node_7( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, nodes_6: &Node, nodes_7: &Node, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str(&self, nodes: &Array) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_0(&self) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_1(&self, nodes_1: &str) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_2( &self, nodes_1: &str, nodes_2: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_3( &self, nodes_1: &str, nodes_2: &str, nodes_3: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_4( &self, nodes_1: &str, nodes_2: &str, nodes_3: &str, nodes_4: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_5( &self, nodes_1: &str, nodes_2: &str, nodes_3: &str, nodes_4: &str, nodes_5: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_6( &self, nodes_1: &str, nodes_2: &str, nodes_3: &str, nodes_4: &str, nodes_5: &str, nodes_6: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn append_with_str_7( &self, nodes_1: &str, nodes_2: &str, nodes_3: &str, nodes_4: &str, nodes_5: &str, nodes_6: &str, nodes_7: &str, ) -> Result<(), JsValue>

The append() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node(&self, nodes: &Array) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_0(&self) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_1(&self, nodes_1: &Node) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_2( &self, nodes_1: &Node, nodes_2: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_3( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_4( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_5( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_6( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, nodes_6: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_node_7( &self, nodes_1: &Node, nodes_2: &Node, nodes_3: &Node, nodes_4: &Node, nodes_5: &Node, nodes_6: &Node, nodes_7: &Node, ) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_str(&self, nodes: &Array) -> Result<(), JsValue>

The prepend() method.

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment

Source

pub fn prepend_with_str_0(&self) -> Result<