plinth/browser/shadow
Types
pub type ShadowRoot
Values
pub fn append_child(root: ShadowRoot, element: Element) -> Nil
pub fn attach_shadow(element: Element, mode: Mode) -> ShadowRoot
pub fn query_selector(
shadow_root: ShadowRoot,
selector: String,
) -> Result(Element, Nil)
Returns the first element that matches the given selector in the given shadow root, if any.
pub fn query_selector_all(
shadow_root: ShadowRoot,
selector: String,
) -> Array(Element)
Returns all elements that match the given selector in the given shadow root.
pub fn shadow_root(element: Element) -> Result(ShadowRoot, Nil)
Returns the shadow root attached to the given element, if any.