pub struct ShadowRootData {
pub host: NodeId,
pub mode: ShadowRootMode,
pub stylesheet_nodes: Vec<NodeId>,
}Expand description
Data associated with a NodeData::ShadowRoot node.
A shadow root is a non-element, non-document node that acts as the root of a
shadow tree. Its children (on the owning Node) are the top-level nodes
of the shadow tree. The light-DOM children of the host element are
distributed into any <slot> elements within this tree to form the
“flattened tree” that is used for style resolution, layout and painting.
Fields§
§host: NodeIdThe node id of the host element that this shadow root is attached to.
mode: ShadowRootModeThe encapsulation mode of this shadow root.
stylesheet_nodes: Vec<NodeId>Node ids of <style> elements within this shadow root, in document
order. Used to build the scoped stylesheet set for this shadow tree.
Implementations§
Source§impl ShadowRootData
impl ShadowRootData
pub fn new(host: NodeId, mode: ShadowRootMode) -> Self
Trait Implementations§
Source§impl Clone for ShadowRootData
impl Clone for ShadowRootData
Source§fn clone(&self) -> ShadowRootData
fn clone(&self) -> ShadowRootData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShadowRootData
impl RefUnwindSafe for ShadowRootData
impl Send for ShadowRootData
impl Sync for ShadowRootData
impl Unpin for ShadowRootData
impl UnsafeUnpin for ShadowRootData
impl UnwindSafe for ShadowRootData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert