pub struct Node {Show 25 fields
pub id: usize,
pub parent: Option<usize>,
pub children: Vec<usize>,
pub layout_parent: Cell<Option<usize>>,
pub layout_children: RefCell<Option<Vec<usize>>>,
pub paint_children: RefCell<Option<Vec<usize>>>,
pub stacking_context: Option<Box<HoistedPaintChildren>>,
pub flags: NodeFlags,
pub data: NodeData,
pub stylo_element_data: StyloData,
pub selector_flags: Cell<ElementSelectorFlags>,
pub guard: SharedRwLock,
pub element_state: ElementState,
pub has_snapshot: bool,
pub snapshot_handled: AtomicBool,
pub dirty_descendants: AtomicBool,
pub before: Option<usize>,
pub after: Option<usize>,
pub style: Style<Atom>,
pub display_constructed_as: Display,
pub cache: Cache,
pub unrounded_layout: Layout,
pub final_layout: Layout,
pub scroll_offset: Point<f64>,
pub transform: Option<Affine>,
/* private fields */
}Fields§
§id: usizeOur Id
parent: Option<usize>Our parent’s ID
children: Vec<usize>§layout_parent: Cell<Option<usize>>Our parent in the layout hierachy: a separate list that includes anonymous collections of inline elements
layout_children: RefCell<Option<Vec<usize>>>A separate child list that includes anonymous collections of inline elements
paint_children: RefCell<Option<Vec<usize>>>The same as layout_children, but sorted by z-index
stacking_context: Option<Box<HoistedPaintChildren>>§flags: NodeFlags§data: NodeDataNode type (Element, TextNode, etc) specific data
stylo_element_data: StyloData§selector_flags: Cell<ElementSelectorFlags>§guard: SharedRwLock§element_state: ElementState§has_snapshot: bool§snapshot_handled: AtomicBool§dirty_descendants: AtomicBoolWhether any descendant of this node needs restyling. Used by Stylo’s incremental style traversal to skip unchanged subtrees.
before: Option<usize>§after: Option<usize>§style: Style<Atom>§display_constructed_as: Display§cache: Cache§unrounded_layout: Layout§final_layout: Layout§scroll_offset: Point<f64>§transform: Option<Affine>Implementations§
Source§impl Node
impl Node
pub fn pe_by_index(&self, index: usize) -> Option<usize>
pub fn set_pe_by_index(&mut self, index: usize, value: Option<usize>)
pub fn is_or_contains_block(&self) -> bool
pub fn is_whitespace_node(&self) -> bool
pub fn is_focussable(&self) -> bool
pub fn set_restyle_hint(&mut self, hint: RestyleHint)
Sourcepub fn has_dirty_descendants(&self) -> bool
pub fn has_dirty_descendants(&self) -> bool
Returns whether this node has any descendants that need restyling.
Sourcepub fn set_dirty_descendants(&self)
pub fn set_dirty_descendants(&self)
Sets the dirty_descendants flag on this node.
Sourcepub fn unset_dirty_descendants(&self)
pub fn unset_dirty_descendants(&self)
Clears the dirty_descendants flag on this node.
Sourcepub fn mark_ancestors_dirty(&self)
pub fn mark_ancestors_dirty(&self)
Marks all ancestors of this node as having dirty descendants. This propagates the dirty flag up the tree so that the style traversal knows to visit the subtree containing this node.
pub fn damage(&self) -> Option<RestyleDamage>
pub fn set_damage(&mut self, damage: RestyleDamage)
pub fn insert_damage(&mut self, damage: RestyleDamage)
pub fn remove_damage(&mut self, damage: RestyleDamage)
pub fn clear_damage_mut(&mut self)
pub fn hover(&mut self)
pub fn unhover(&mut self)
pub fn is_hovered(&self) -> bool
pub fn focus(&mut self, shell_provider: Arc<dyn ShellProvider>)
pub fn blur(&mut self, shell_provider: Arc<dyn ShellProvider>)
pub fn is_focussed(&self) -> bool
pub fn active(&mut self)
pub fn unactive(&mut self)
pub fn is_active(&self) -> bool
pub fn disable(&mut self)
pub fn enable(&mut self)
pub fn subdoc(&self) -> Option<&dyn Document>
pub fn subdoc_mut(&mut self) -> Option<&mut dyn Document>
pub fn text_input_v_centering_offset(&self, scale: f64) -> f64
Source§impl Node
impl Node
pub fn tree(&self) -> &Slab<Node>
pub fn with(&self, id: usize) -> &Node
pub fn print_tree(&self, level: usize)
pub fn index_of_child(&self, child_id: usize) -> Option<usize>
pub fn child_index(&self) -> Option<usize>
pub fn forward(&self, n: usize) -> Option<&Node>
pub fn backward(&self, n: usize) -> Option<&Node>
pub fn is_element(&self) -> bool
pub fn is_anonymous(&self) -> bool
pub fn is_text_node(&self) -> bool
pub fn element_data(&self) -> Option<&ElementData>
pub fn element_data_mut(&mut self) -> Option<&mut ElementData>
pub fn text_data(&self) -> Option<&TextNodeData>
pub fn text_data_mut(&mut self) -> Option<&mut TextNodeData>
pub fn node_debug_str(&self) -> String
pub fn outer_html(&self) -> String
pub fn write_outer_html(&self, writer: &mut String)
pub fn attrs(&self) -> Option<&[Attribute]>
pub fn attr(&self, name: LocalName) -> Option<&str>
pub fn primary_styles( &self, ) -> Option<impl Deref<Target = ServoArc<ComputedValues>>>
pub fn text_content(&self) -> String
pub fn flush_style_attribute(&mut self, url_extra_data: &UrlExtraData)
pub fn order(&self) -> i32
pub fn z_index(&self) -> i32
pub fn is_stacking_context_root(&self, is_flex_or_grid_item: bool) -> bool
Sourcepub fn hit(&self, x: f32, y: f32) -> Option<HitResult>
pub fn hit(&self, x: f32, y: f32) -> Option<HitResult>
Takes an (x, y) position (relative to the parent’s top-left corner) and returns:
- None if the position is outside of this node’s bounds
- Some(HitResult) if the position is within the node but doesn’t match any children
- The result of recursively calling child.hit() on the the child element that is positioned at that position if there is one.
TODO: z-index (If multiple children are positioned at the position then a random one will be recursed into)
Sourcepub fn inline_root_ancestor(&self) -> Option<&Node>
pub fn inline_root_ancestor(&self) -> Option<&Node>
Find the inline root ancestor of this node (or self if this is an inline root). Returns None if no inline root ancestor exists.
Sourcepub fn text_offset_at_point(&self, x: f32, y: f32) -> Option<usize>
pub fn text_offset_at_point(&self, x: f32, y: f32) -> Option<usize>
Get the text byte offset at a given point, using coordinates already transformed to be relative to this inline root’s content box. Returns Some(byte_offset) if the point hits text, None otherwise.
Sourcepub fn absolute_position(&self, x: f32, y: f32) -> Point<f32>
pub fn absolute_position(&self, x: f32, y: f32) -> Point<f32>
Computes the Document-relative coordinates of the Node
Sourcepub fn synthetic_click_event(&self, mods: Modifiers) -> DomEventData
pub fn synthetic_click_event(&self, mods: Modifiers) -> DomEventData
Creates a synthetic click event
pub fn synthetic_click_event_data(&self, mods: Modifiers) -> BlitzPointerEvent
Trait Implementations§
Source§impl AttributeProvider for &'_ Node
impl AttributeProvider for &'_ Node
Source§impl Element for &'_ Node
impl Element for &'_ Node
type Impl = SelectorImpl
Source§fn opaque(&self) -> OpaqueElement
fn opaque(&self) -> OpaqueElement
fn parent_element(&self) -> Option<Self>
Source§fn parent_node_is_shadow_root(&self) -> bool
fn parent_node_is_shadow_root(&self) -> bool
Source§fn containing_shadow_host(&self) -> Option<Self>
fn containing_shadow_host(&self) -> Option<Self>
Source§fn is_pseudo_element(&self) -> bool
fn is_pseudo_element(&self) -> bool
Source§fn prev_sibling_element(&self) -> Option<Self>
fn prev_sibling_element(&self) -> Option<Self>
Source§fn next_sibling_element(&self) -> Option<Self>
fn next_sibling_element(&self) -> Option<Self>
Source§fn first_element_child(&self) -> Option<Self>
fn first_element_child(&self) -> Option<Self>
fn is_html_element_in_html_document(&self) -> bool
fn has_local_name(&self, local_name: &LocalName) -> bool
Source§fn has_namespace(&self, ns: &Namespace) -> bool
fn has_namespace(&self, ns: &Namespace) -> bool
Source§fn is_same_type(&self, other: &Self) -> bool
fn is_same_type(&self, other: &Self) -> bool
other element have the same local name and namespace.fn attr_matches( &self, _ns: &NamespaceConstraint<&GenericAtomIdent<NamespaceStaticSet>>, local_name: &GenericAtomIdent<LocalNameStaticSet>, operation: &AttrSelectorOperation<&AtomString>, ) -> bool
fn match_non_ts_pseudo_class( &self, pseudo_class: &<Self::Impl as SelectorImpl>::NonTSPseudoClass, _context: &mut MatchingContext<'_, Self::Impl>, ) -> bool
fn match_pseudo_element( &self, pe: &PseudoElement, _context: &mut MatchingContext<'_, Self::Impl>, ) -> bool
Source§fn apply_selector_flags(&self, flags: ElementSelectorFlags)
fn apply_selector_flags(&self, flags: ElementSelectorFlags)
Source§fn is_html_slot_element(&self) -> bool
fn is_html_slot_element(&self) -> bool
fn has_id( &self, id: &<Self::Impl as SelectorImpl>::Identifier, case_sensitivity: CaseSensitivity, ) -> bool
fn has_class( &self, search_name: &<Self::Impl as SelectorImpl>::Identifier, case_sensitivity: CaseSensitivity, ) -> bool
Source§fn imported_part(
&self,
_name: &<Self::Impl as SelectorImpl>::Identifier,
) -> Option<<Self::Impl as SelectorImpl>::Identifier>
fn imported_part( &self, _name: &<Self::Impl as SelectorImpl>::Identifier, ) -> Option<<Self::Impl as SelectorImpl>::Identifier>
exportparts attribute in the reverse
direction, that is, in an outer-tree -> inner-tree direction.fn is_part(&self, _name: &<Self::Impl as SelectorImpl>::Identifier) -> bool
Source§fn is_root(&self) -> bool
fn is_root(&self) -> bool
:root,
i.e. whether it is the root element of a document. Read morefn has_custom_state( &self, _name: &<Self::Impl as SelectorImpl>::Identifier, ) -> bool
Source§fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool
fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool
Source§fn pseudo_element_originating_element(&self) -> Option<Self>
fn pseudo_element_originating_element(&self) -> Option<Self>
fn has_attr_in_no_namespace( &self, local_name: &<Self::Impl as SelectorImpl>::LocalName, ) -> bool
Source§fn assigned_slot(&self) -> Option<Self>
fn assigned_slot(&self) -> Option<Self>
Source§fn ignores_nth_child_selectors(&self) -> bool
fn ignores_nth_child_selectors(&self) -> bool
Source§impl NodeInfo for &'_ Node
impl NodeInfo for &'_ Node
Source§fn is_element(&self) -> bool
fn is_element(&self) -> bool
Source§fn is_text_node(&self) -> bool
fn is_text_node(&self) -> bool
Source§impl PartialEq for Node
It might be wrong to expose this since what does equality mean outside the dom?
impl PartialEq for Node
It might be wrong to expose this since what does equality mean outside the dom?
Source§impl<'a> TDocument for &'a Node
impl<'a> TDocument for &'a Node
Source§type ConcreteNode = &'a Node
type ConcreteNode = &'a Node
TNode type.Source§fn as_node(&self) -> Self::ConcreteNode
fn as_node(&self) -> Self::ConcreteNode
TNode.Source§fn is_html_document(&self) -> bool
fn is_html_document(&self) -> bool
Source§fn quirks_mode(&self) -> QuirksMode
fn quirks_mode(&self) -> QuirksMode
Source§fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
Source§impl<'a> TElement for &'a Node
impl<'a> TElement for &'a Node
Source§type ConcreteNode = &'a Node
type ConcreteNode = &'a Node
Source§type TraversalChildrenIterator = Traverser<'a>
type TraversalChildrenIterator = Traverser<'a>
Nodes. Read moreSource§fn as_node(&self) -> Self::ConcreteNode
fn as_node(&self) -> Self::ConcreteNode
Source§fn implicit_scope_for_sheet_in_shadow_root(
_opaque_host: OpaqueElement,
_sheet_index: usize,
) -> Option<ImplicitScopeRoot>
fn implicit_scope_for_sheet_in_shadow_root( _opaque_host: OpaqueElement, _sheet_index: usize, ) -> Option<ImplicitScopeRoot>
Source§fn traversal_children(&self) -> LayoutIterator<Self::TraversalChildrenIterator>
fn traversal_children(&self) -> LayoutIterator<Self::TraversalChildrenIterator>
Source§fn is_html_element(&self) -> bool
fn is_html_element(&self) -> bool
Source§fn is_mathml_element(&self) -> bool
fn is_mathml_element(&self) -> bool
Source§fn is_svg_element(&self) -> bool
fn is_svg_element(&self) -> bool
Source§fn style_attribute(
&self,
) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>
fn style_attribute( &self, ) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>
Source§fn state(&self) -> ElementState
fn state(&self) -> ElementState
Source§fn has_part_attr(&self) -> bool
fn has_part_attr(&self) -> bool
part attribute.Source§fn exports_any_part(&self) -> bool
fn exports_any_part(&self) -> bool
Source§fn each_class<F>(&self, callback: F)
fn each_class<F>(&self, callback: F)
Source§fn each_attr_name<F>(&self, callback: F)
fn each_attr_name<F>(&self, callback: F)
Source§fn has_dirty_descendants(&self) -> bool
fn has_dirty_descendants(&self) -> bool
Source§fn has_snapshot(&self) -> bool
fn has_snapshot(&self) -> bool
Source§fn handled_snapshot(&self) -> bool
fn handled_snapshot(&self) -> bool
Source§unsafe fn set_handled_snapshot(&self)
unsafe fn set_handled_snapshot(&self)
Source§unsafe fn set_dirty_descendants(&self)
unsafe fn set_dirty_descendants(&self)
Source§unsafe fn unset_dirty_descendants(&self)
unsafe fn unset_dirty_descendants(&self)
Source§fn store_children_to_process(&self, _n: isize)
fn store_children_to_process(&self, _n: isize)
Source§fn did_process_child(&self) -> isize
fn did_process_child(&self) -> isize
Source§unsafe fn ensure_data(&self) -> ElementDataMut<'_>
unsafe fn ensure_data(&self) -> ElementDataMut<'_>
Source§unsafe fn clear_data(&self)
unsafe fn clear_data(&self)
Source§fn borrow_data(&self) -> Option<ElementDataRef<'_>>
fn borrow_data(&self) -> Option<ElementDataRef<'_>>
Source§fn mutate_data(&self) -> Option<ElementDataMut<'_>>
fn mutate_data(&self) -> Option<ElementDataMut<'_>>
Source§fn skip_item_display_fixup(&self) -> bool
fn skip_item_display_fixup(&self) -> bool
Source§fn may_have_animations(&self) -> bool
fn may_have_animations(&self) -> bool
Source§fn has_animations(&self, context: &SharedStyleContext<'_>) -> bool
fn has_animations(&self, context: &SharedStyleContext<'_>) -> bool
Source§fn has_css_animations(
&self,
context: &SharedStyleContext<'_>,
pseudo_element: Option<PseudoElement>,
) -> bool
fn has_css_animations( &self, context: &SharedStyleContext<'_>, pseudo_element: Option<PseudoElement>, ) -> bool
context and pseudo_element
arguments are only used by Servo, since it stores animations globally and pseudo-elements
are not in the DOM.Source§fn has_css_transitions(
&self,
context: &SharedStyleContext<'_>,
pseudo_element: Option<PseudoElement>,
) -> bool
fn has_css_transitions( &self, context: &SharedStyleContext<'_>, pseudo_element: Option<PseudoElement>, ) -> bool
context and pseudo_element arguments are only used
by Servo, since it stores animations globally and pseudo-elements are not in the DOM.Source§fn animation_rule(
&self,
context: &SharedStyleContext<'_>,
) -> Option<Arc<Locked<PropertyDeclarationBlock>>>
fn animation_rule( &self, context: &SharedStyleContext<'_>, ) -> Option<Arc<Locked<PropertyDeclarationBlock>>>
Source§fn transition_rule(
&self,
context: &SharedStyleContext<'_>,
) -> Option<Arc<Locked<PropertyDeclarationBlock>>>
fn transition_rule( &self, context: &SharedStyleContext<'_>, ) -> Option<Arc<Locked<PropertyDeclarationBlock>>>
Source§fn shadow_root(
&self,
) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>
fn shadow_root( &self, ) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>
Source§fn containing_shadow(
&self,
) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>
fn containing_shadow( &self, ) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>
Source§fn lang_attr(&self) -> Option<AttrValue>
fn lang_attr(&self) -> Option<AttrValue>
xml:lang="" attribute (or, if appropriate,
the lang="" attribute) on this element.Source§fn match_element_lang(
&self,
_override_lang: Option<Option<AttrValue>>,
_value: &Lang,
) -> bool
fn match_element_lang( &self, _override_lang: Option<Option<AttrValue>>, _value: &Lang, ) -> bool
value. If override_lang is not None, it specifies the value
of the xml:lang="" or lang="" attribute to use in place of
looking at the element and its ancestors. (This argument is used
to implement matching of :lang() against snapshots.)Source§fn is_html_document_body_element(&self) -> bool
fn is_html_document_body_element(&self) -> bool
Source§fn synthesize_presentational_hints_for_legacy_attributes<V>(
&self,
_visited_handling: VisitedHandlingMode,
hints: &mut V,
)where
V: Push<ApplicableDeclarationBlock>,
fn synthesize_presentational_hints_for_legacy_attributes<V>(
&self,
_visited_handling: VisitedHandlingMode,
hints: &mut V,
)where
V: Push<ApplicableDeclarationBlock>,
hints.Source§fn local_name(&self) -> &LocalName
fn local_name(&self) -> &LocalName
Source§fn query_container_size(&self, _display: &Display) -> Size2D<Option<Au>>
fn query_container_size(&self, _display: &Display) -> Size2D<Option<Au>>
Source§fn each_custom_state<F>(&self, _callback: F)
fn each_custom_state<F>(&self, _callback: F)
Source§fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool
Source§fn relative_selector_search_direction(&self) -> ElementSelectorFlags
fn relative_selector_search_direction(&self) -> ElementSelectorFlags
Source§fn compute_layout_damage(
old: &ComputedValues,
new: &ComputedValues,
) -> RestyleDamage
fn compute_layout_damage( old: &ComputedValues, new: &ComputedValues, ) -> RestyleDamage
_old to _new.Source§fn owner_doc_matches_for_testing(&self, _: &Device) -> bool
fn owner_doc_matches_for_testing(&self, _: &Device) -> bool
Source§fn matches_user_and_content_rules(&self) -> bool
fn matches_user_and_content_rules(&self) -> bool
Source§fn traversal_parent(&self) -> Option<Self>
fn traversal_parent(&self) -> Option<Self>
Source§fn inheritance_parent(&self) -> Option<Self>
fn inheritance_parent(&self) -> Option<Self>
Source§fn each_anonymous_content_child<F>(&self, _f: F)where
F: FnMut(Self),
fn each_anonymous_content_child<F>(&self, _f: F)where
F: FnMut(Self),
f for each anonymous content child (apart from ::before and
::after) whose originating element is self.Source§fn is_xul_element(&self) -> bool
fn is_xul_element(&self) -> bool
Source§fn subtree_bloom_filter(&self) -> u64
fn subtree_bloom_filter(&self) -> u64
Source§fn bloom_may_have_hash(&self, bloom_hash: u64) -> bool
fn bloom_may_have_hash(&self, bloom_hash: u64) -> bool
Source§fn hash_for_bloom_filter(hash: u32) -> u64
fn hash_for_bloom_filter(hash: u32) -> u64
Source§fn slotted_nodes(&self) -> &[Self::ConcreteNode]
fn slotted_nodes(&self) -> &[Self::ConcreteNode]
Source§fn unset_dirty_style_attribute(&self)
fn unset_dirty_style_attribute(&self)
Source§fn smil_override(
&self,
) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>
fn smil_override( &self, ) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>
Source§fn animation_declarations(
&self,
context: &SharedStyleContext<'_>,
) -> AnimationDeclarations
fn animation_declarations( &self, context: &SharedStyleContext<'_>, ) -> AnimationDeclarations
Source§fn each_exported_part<F>(
&self,
_name: &GenericAtomIdent<AtomStaticSet>,
_callback: F,
)
fn each_exported_part<F>( &self, _name: &GenericAtomIdent<AtomStaticSet>, _callback: F, )
Source§fn may_generate_pseudo(
&self,
pseudo: &PseudoElement,
_primary_style: &ComputedValues,
) -> bool
fn may_generate_pseudo( &self, pseudo: &PseudoElement, _primary_style: &ComputedValues, ) -> bool
Source§fn has_current_styles(&self, data: &ElementData) -> bool
fn has_current_styles(&self, data: &ElementData) -> bool
Source§fn has_animation_only_dirty_descendants(&self) -> bool
fn has_animation_only_dirty_descendants(&self) -> bool
Source§unsafe fn set_animation_only_dirty_descendants(&self)
unsafe fn set_animation_only_dirty_descendants(&self)
Source§unsafe fn unset_animation_only_dirty_descendants(&self)
unsafe fn unset_animation_only_dirty_descendants(&self)
Source§unsafe fn clear_descendant_bits(&self)
unsafe fn clear_descendant_bits(&self)
Source§fn is_visited_link(&self) -> bool
fn is_visited_link(&self) -> bool
Source§fn implemented_pseudo_element(&self) -> Option<PseudoElement>
fn implemented_pseudo_element(&self) -> Option<PseudoElement>
Source§fn has_animation_restyle_hints(&self) -> bool
fn has_animation_restyle_hints(&self) -> bool
Source§fn note_highlight_pseudo_style_invalidated(&self)
fn note_highlight_pseudo_style_invalidated(&self)
Source§fn rule_hash_target(&self) -> Self
fn rule_hash_target(&self) -> Self
Source§fn each_applicable_non_document_style_rule_data<'a, F>(&self, f: F) -> boolwhere
Self: 'a,
F: FnMut(&'a CascadeData, Self),
fn each_applicable_non_document_style_rule_data<'a, F>(&self, f: F) -> boolwhere
Self: 'a,
F: FnMut(&'a CascadeData, Self),
Source§fn synthesize_view_transition_dynamic_rules<V>(&self, _rules: &mut V)where
V: Push<ApplicableDeclarationBlock>,
fn synthesize_view_transition_dynamic_rules<V>(&self, _rules: &mut V)where
V: Push<ApplicableDeclarationBlock>,
rules.
https://drafts.csswg.org/css-view-transitions-1/#document-dynamic-view-transition-style-sheetSource§impl<'a> TNode for &'a Node
impl<'a> TNode for &'a Node
Source§type ConcreteElement = &'a Node
type ConcreteElement = &'a Node
TElement type.Source§type ConcreteDocument = &'a Node
type ConcreteDocument = &'a Node
TDocument type.Source§type ConcreteShadowRoot = &'a Node
type ConcreteShadowRoot = &'a Node
TShadowRoot type.Source§fn parent_node(&self) -> Option<Self>
fn parent_node(&self) -> Option<Self>
Source§fn first_child(&self) -> Option<Self>
fn first_child(&self) -> Option<Self>
Source§fn last_child(&self) -> Option<Self>
fn last_child(&self) -> Option<Self>
Source§fn prev_sibling(&self) -> Option<Self>
fn prev_sibling(&self) -> Option<Self>
Source§fn next_sibling(&self) -> Option<Self>
fn next_sibling(&self) -> Option<Self>
Source§fn owner_doc(&self) -> Self::ConcreteDocument
fn owner_doc(&self) -> Self::ConcreteDocument
Source§fn is_in_document(&self) -> bool
fn is_in_document(&self) -> bool
Source§fn traversal_parent(&self) -> Option<Self::ConcreteElement>
fn traversal_parent(&self) -> Option<Self::ConcreteElement>
Source§fn opaque(&self) -> OpaqueNode
fn opaque(&self) -> OpaqueNode
OpaqueNode.Source§fn as_element(&self) -> Option<Self::ConcreteElement>
fn as_element(&self) -> Option<Self::ConcreteElement>
Source§fn as_document(&self) -> Option<Self::ConcreteDocument>
fn as_document(&self) -> Option<Self::ConcreteDocument>
Source§fn as_shadow_root(&self) -> Option<Self::ConcreteShadowRoot>
fn as_shadow_root(&self) -> Option<Self::ConcreteShadowRoot>
Source§fn dom_children(&self) -> DomChildren<Self>
fn dom_children(&self) -> DomChildren<Self>
Source§fn dom_descendants(&self) -> DomDescendants<Self>
fn dom_descendants(&self) -> DomDescendants<Self>
Source§fn next_in_preorder(&self, scoped_to: Self) -> Option<Self>
fn next_in_preorder(&self, scoped_to: Self) -> Option<Self>
Source§fn next_in_preorder_skipping_children(&self, scoped_to: Self) -> Option<Self>
fn next_in_preorder_skipping_children(&self, scoped_to: Self) -> Option<Self>
Source§fn parent_element(&self) -> Option<Self::ConcreteElement>
fn parent_element(&self) -> Option<Self::ConcreteElement>
Source§fn parent_element_or_host(&self) -> Option<Self::ConcreteElement>
fn parent_element_or_host(&self) -> Option<Self::ConcreteElement>
Source§impl<'a> TShadowRoot for &'a Node
impl<'a> TShadowRoot for &'a Node
Source§type ConcreteNode = &'a Node
type ConcreteNode = &'a Node
Source§fn as_node(&self) -> Self::ConcreteNode
fn as_node(&self) -> Self::ConcreteNode
Source§fn host(&self) -> <Self::ConcreteNode as TNode>::ConcreteElement
fn host(&self) -> <Self::ConcreteNode as TNode>::ConcreteElement
Source§fn style_data<'b>(&self) -> Option<&'b CascadeData>where
Self: 'b,
fn style_data<'b>(&self) -> Option<&'b CascadeData>where
Self: 'b,
Source§fn parts<'a>(&self) -> &[<Self::ConcreteNode as TNode>::ConcreteElement]where
Self: 'a,
fn parts<'a>(&self) -> &[<Self::ConcreteNode as TNode>::ConcreteElement]where
Self: 'a,
Source§fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
Source§fn implicit_scope_for_sheet(
&self,
_sheet_index: usize,
) -> Option<ImplicitScopeRoot>
fn implicit_scope_for_sheet( &self, _sheet_index: usize, ) -> Option<ImplicitScopeRoot>
impl Eq for Node
impl Send for Node
impl Sync for Node
Auto Trait Implementations§
impl !Freeze for Node
impl !RefUnwindSafe for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl !UnwindSafe for Node
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 more