Struct web_sys::ShadowRoot
source · #[repr(transparent)]pub struct ShadowRoot { /* private fields */ }
Expand description
The ShadowRoot
object
This API requires the following crate features to be activated: ShadowRoot
Implementations§
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn get_element_by_id(&self, element_id: &str) -> Option<Element>
pub fn get_element_by_id(&self, element_id: &str) -> Option<Element>
The getElementById()
method
This API requires the following crate features to be activated: Element
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn get_elements_by_class_name(&self, class_names: &str) -> HtmlCollection
pub fn get_elements_by_class_name(&self, class_names: &str) -> HtmlCollection
The getElementsByClassName()
method
This API requires the following crate features to be activated: HtmlCollection
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn get_elements_by_tag_name(&self, local_name: &str) -> HtmlCollection
pub fn get_elements_by_tag_name(&self, local_name: &str) -> HtmlCollection
The getElementsByTagName()
method
This API requires the following crate features to be activated: HtmlCollection
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn get_elements_by_tag_name_ns(
&self,
namespace: Option<&str>,
local_name: &str
) -> HtmlCollection
pub fn get_elements_by_tag_name_ns(
&self,
namespace: Option<&str>,
local_name: &str
) -> HtmlCollection
The getElementsByTagNameNS()
method
This API requires the following crate features to be activated: HtmlCollection
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn mode(&self) -> ShadowRootMode
pub fn mode(&self) -> ShadowRootMode
The mode
getter
This API requires the following crate features to be activated: ShadowRoot
, ShadowRootMode
source§impl ShadowRoot
impl ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn inner_html(&self) -> String
pub fn inner_html(&self) -> String
The innerHTML
getter
This API requires the following crate features to be activated: ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn set_inner_html(&self, inner_html: &str)
pub fn set_inner_html(&self, inner_html: &str)
The innerHTML
setter
This API requires the following crate features to be activated: ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn active_element(&self) -> Option<Element>
pub fn active_element(&self) -> Option<Element>
The activeElement
getter
This API requires the following crate features to be activated: Element
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn style_sheets(&self) -> StyleSheetList
pub fn style_sheets(&self) -> StyleSheetList
The styleSheets
getter
This API requires the following crate features to be activated: ShadowRoot
, StyleSheetList
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn pointer_lock_element(&self) -> Option<Element>
pub fn pointer_lock_element(&self) -> Option<Element>
The pointerLockElement
getter
This API requires the following crate features to be activated: Element
, ShadowRoot
source§impl ShadowRoot
impl ShadowRoot
sourcepub fn fullscreen_element(&self) -> Option<Element>
pub fn fullscreen_element(&self) -> Option<Element>
The fullscreenElement
getter
This API requires the following crate features to be activated: Element
, ShadowRoot
Trait Implementations§
source§impl AsRef<DocumentFragment> for ShadowRoot
impl AsRef<DocumentFragment> for ShadowRoot
source§fn as_ref(&self) -> &DocumentFragment
fn as_ref(&self) -> &DocumentFragment
source§impl AsRef<EventTarget> for ShadowRoot
impl AsRef<EventTarget> for ShadowRoot
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for ShadowRoot
impl AsRef<JsValue> for ShadowRoot
source§impl AsRef<Node> for ShadowRoot
impl AsRef<Node> for ShadowRoot
source§impl AsRef<Object> for ShadowRoot
impl AsRef<Object> for ShadowRoot
source§impl Clone for ShadowRoot
impl Clone for ShadowRoot
source§fn clone(&self) -> ShadowRoot
fn clone(&self) -> ShadowRoot
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShadowRoot
impl Debug for ShadowRoot
source§impl From<JsValue> for ShadowRoot
impl From<JsValue> for ShadowRoot
source§fn from(obj: JsValue) -> ShadowRoot
fn from(obj: JsValue) -> ShadowRoot
source§impl From<ShadowRoot> for DocumentFragment
impl From<ShadowRoot> for DocumentFragment
source§fn from(obj: ShadowRoot) -> DocumentFragment
fn from(obj: ShadowRoot) -> DocumentFragment
source§impl From<ShadowRoot> for EventTarget
impl From<ShadowRoot> for EventTarget
source§fn from(obj: ShadowRoot) -> EventTarget
fn from(obj: ShadowRoot) -> EventTarget
source§impl From<ShadowRoot> for JsValue
impl From<ShadowRoot> for JsValue
source§fn from(obj: ShadowRoot) -> JsValue
fn from(obj: ShadowRoot) -> JsValue
source§impl From<ShadowRoot> for Node
impl From<ShadowRoot> for Node
source§fn from(obj: ShadowRoot) -> Node
fn from(obj: ShadowRoot) -> Node
source§impl From<ShadowRoot> for Object
impl From<ShadowRoot> for Object
source§fn from(obj: ShadowRoot) -> Object
fn from(obj: ShadowRoot) -> Object
source§impl FromWasmAbi for ShadowRoot
impl FromWasmAbi for ShadowRoot
source§impl<'a> IntoWasmAbi for &'a ShadowRoot
impl<'a> IntoWasmAbi for &'a ShadowRoot
source§impl IntoWasmAbi for ShadowRoot
impl IntoWasmAbi for ShadowRoot
source§impl JsCast for ShadowRoot
impl JsCast for ShadowRoot
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for ShadowRoot
impl OptionFromWasmAbi for ShadowRoot
source§impl<'a> OptionIntoWasmAbi for &'a ShadowRoot
impl<'a> OptionIntoWasmAbi for &'a ShadowRoot
source§impl OptionIntoWasmAbi for ShadowRoot
impl OptionIntoWasmAbi for ShadowRoot
source§impl RefFromWasmAbi for ShadowRoot
impl RefFromWasmAbi for ShadowRoot
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<ShadowRoot>
type Anchor = ManuallyDrop<ShadowRoot>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ShadowRoot
impl !Send for ShadowRoot
impl !Sync for ShadowRoot
impl Unpin for ShadowRoot
impl UnwindSafe for ShadowRoot
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more