Node

Struct Node 

Source
#[repr(C)]
pub struct Node {
Show 13 fields eventtarget: EventTarget, parent_node: MutNullableDom<Node>, first_child: MutNullableDom<Node>, last_child: MutNullableDom<Node>, next_sibling: MutNullableDom<Node>, prev_sibling: MutNullableDom<Node>, owner_doc: MutNullableDom<Document>, rare_data: DomRefCell<Option<Box<NodeRareData>>>, children_count: Cell<u32>, flags: Cell<NodeFlags>, inclusive_descendants_version: Cell<u64>, style_data: DomRefCell<Option<Box<StyleData>>>, layout_data: DomRefCell<Option<Box<GenericLayoutData>>>,
}
Expand description

An HTML node.

Fields§

§eventtarget: EventTarget

The JavaScript reflector for this node.

§parent_node: MutNullableDom<Node>

The parent of this node.

§first_child: MutNullableDom<Node>

The first child of this node.

§last_child: MutNullableDom<Node>

The last child of this node.

§next_sibling: MutNullableDom<Node>

The next sibling of this node.

§prev_sibling: MutNullableDom<Node>

The previous sibling of this node.

§owner_doc: MutNullableDom<Document>

The document that this node belongs to.

§rare_data: DomRefCell<Option<Box<NodeRareData>>>

Rare node data.

§children_count: Cell<u32>

The live count of children of this node.

§flags: Cell<NodeFlags>

A bitfield of flags for node items.

§inclusive_descendants_version: Cell<u64>

The maximum version of any inclusive descendant of this node.

§style_data: DomRefCell<Option<Box<StyleData>>>

Style data for this node. This is accessed and mutated by style passes and is used to lay out this node and populate layout data.

§layout_data: DomRefCell<Option<Box<GenericLayoutData>>>

Layout data for this node. This is populated during layout and can be used for incremental relayout and script queries.

Implementations§

Source§

impl Node

Source§

impl Node

Source

fn add_child(&self, new_child: &Node, before: Option<&Node>, can_gc: CanGc)

Adds a new child to the end of this node’s list of children.

Fails unless new_child is disconnected from the tree.

Source

pub(crate) fn unsafely_set_html( target: &Node, context_element: &Element, html: DOMString, can_gc: CanGc, )

Implements the “unsafely set HTML” algorithm as specified in: https://html.spec.whatwg.org/multipage/#concept-unsafely-set-html

Source

pub(crate) fn clean_up_style_and_layout_data(&self)

Source

pub(crate) fn complete_remove_subtree( root: &Node, context: &UnbindContext<'_>, can_gc: CanGc, )

Clean up flags and runs steps 11-14 of remove a node. https://dom.spec.whatwg.org/#concept-node-remove

Source

fn remove_child(&self, child: &Node, cached_index: Option<u32>, can_gc: CanGc)

Removes the given child from this node’s list of children.

Fails unless child is a child of this node.

Source

pub(crate) fn to_untrusted_node_address(&self) -> UntrustedNodeAddress

Source

pub(crate) fn to_opaque(&self) -> OpaqueNode

Source

pub(crate) fn as_custom_element(&self) -> Option<DomRoot<Element>>

Source

pub(crate) fn fire_synthetic_pointer_event_not_trusted( &self, name: DOMString, can_gc: CanGc, )

Source

pub(crate) fn parent_directionality(&self) -> String

Source§

impl Node

Source

fn rare_data(&self) -> Ref<'_, Option<Box<NodeRareData>>>

Source

fn ensure_rare_data(&self) -> RefMut<'_, Box<NodeRareData>>

Source

pub(crate) fn is_before(&self, other: &Node) -> bool

Returns true if this node is before other in the same connected DOM tree.

Source

pub(crate) fn registered_mutation_observers_mut( &self, ) -> RefMut<'_, Vec<RegisteredObserver>>

Return all registered mutation observers for this node. Lazily initialize the raredata if it does not exist.

Source

pub(crate) fn registered_mutation_observers( &self, ) -> Option<Ref<'_, Vec<RegisteredObserver>>>

Source

pub(crate) fn add_mutation_observer(&self, observer: RegisteredObserver)

Add a new mutation observer for a given node.

Source

pub(crate) fn remove_mutation_observer(&self, observer: &MutationObserver)

Removes the mutation observer for a given node.

Source

pub(crate) fn dump(&self)

Dumps the subtree rooted at this node, for debugging.

Source

pub(crate) fn dump_indent(&self, indent: u32)

Dumps the node tree, for debugging, with indentation.

Source

pub(crate) fn debug_str(&self) -> String

Returns a string that describes this node.

Source

pub(crate) fn is_in_a_document_tree(&self) -> bool

Source

pub(crate) fn is_in_a_shadow_tree(&self) -> bool

Return true iff node’s root is a shadow-root.

Source

pub(crate) fn has_weird_parser_insertion_mode(&self) -> bool

Source

pub(crate) fn set_weird_parser_insertion_mode(&self)

Source

pub(crate) fn is_connected(&self) -> bool

Source

pub(crate) fn set_in_ua_widget(&self, in_ua_widget: bool)

Source

pub(crate) fn is_in_ua_widget(&self) -> bool

Source

pub(crate) fn type_id(&self) -> NodeTypeId

Returns the type ID of this node.

Source

pub(crate) fn len(&self) -> u32

Source

pub(crate) fn is_empty(&self) -> bool

Source

pub(crate) fn index(&self) -> u32

Source

pub(crate) fn has_parent(&self) -> bool

Returns true if this node has a parent.

Source

pub(crate) fn children_count(&self) -> u32

Source

pub(crate) fn ranges(&self) -> RefMut<'_, WeakRangeVec>

Source

pub(crate) fn ranges_is_empty(&self) -> bool

Source

pub(crate) fn is_doctype(&self) -> bool

Source

pub(crate) fn get_flag(&self, flag: NodeFlags) -> bool

Source

pub(crate) fn set_flag(&self, flag: NodeFlags, value: bool)

Source

pub(crate) fn note_dirty_descendants(&self)

Source

pub(crate) fn has_dirty_descendants(&self) -> bool

Source

pub(crate) fn rev_version(&self)

Source

pub(crate) fn dirty(&self, damage: NodeDamage)

Source

pub(crate) fn inclusive_descendants_version(&self) -> u64

The maximum version number of this node’s descendants, including itself

Source

pub(crate) fn traverse_preorder( &self, shadow_including: ShadowIncluding, ) -> TreeIterator

Iterates over this node and all its descendants, in preorder.

Source

pub(crate) fn inclusively_following_siblings( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn inclusively_preceding_siblings( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn common_ancestor( &self, other: &Node, shadow_including: ShadowIncluding, ) -> Option<DomRoot<Node>>

Source

pub(crate) fn common_ancestor_in_flat_tree( &self, other: &Node, ) -> Option<DomRoot<Node>>

Source

pub(crate) fn is_inclusive_ancestor_of(&self, child: &Node) -> bool

Source

pub(crate) fn is_ancestor_of(&self, child: &Node) -> bool

Source

pub(crate) fn is_shadow_including_inclusive_ancestor_of( &self, node: &Node, ) -> bool

Source

pub(crate) fn following_siblings( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn preceding_siblings( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn following_nodes(&self, root: &Node) -> FollowingNodeIterator

Source

pub(crate) fn preceding_nodes(&self, root: &Node) -> PrecedingNodeIterator

Source

pub(crate) fn descending_last_children( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Return an iterator that moves from self down the tree, choosing the last child at each step of the way.

Source

pub(crate) fn is_parent_of(&self, child: &Node) -> bool

Source

pub(crate) fn to_trusted_node_address(&self) -> TrustedNodeAddress

Source

pub(crate) fn padding(&self) -> Option<PhysicalSides>

Source

pub(crate) fn content_box(&self) -> Option<Rect<Au>>

Source

pub(crate) fn border_box(&self) -> Option<Rect<Au>>

Source

pub(crate) fn padding_box(&self) -> Option<Rect<Au>>

Source

pub(crate) fn border_boxes(&self) -> Vec<Rect<Au>>

Source

pub(crate) fn client_rect(&self) -> Rect<i32>

Source

pub(crate) fn scroll_area(&self) -> Rect<i32>

Source

pub(crate) fn before( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn after( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn replace_with( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn prepend( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn append( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn replace_children( &self, nodes: Vec<NodeOrString<DomTypeHolder>>, can_gc: CanGc, ) -> ErrorResult

Source

pub(crate) fn query_selector( &self, selectors: DOMString, ) -> Fallible<Option<DomRoot<Element>>>

Source

pub(crate) fn query_selector_iter( &self, selectors: DOMString, ) -> Fallible<QuerySelectorIterator>

https://dom.spec.whatwg.org/#scope-match-a-selectors-string Get an iterator over all nodes which match a set of selectors Be careful not to do anything which may manipulate the DOM tree whilst iterating, otherwise the iterator may be invalidated.

Source

pub(crate) fn query_selector_all( &self, selectors: DOMString, ) -> Fallible<DomRoot<NodeList>>

Source

pub(crate) fn ancestors(&self) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn inclusive_ancestors( &self, shadow_including: ShadowIncluding, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn owner_doc(&self) -> DomRoot<Document>

Source

pub(crate) fn set_owner_doc(&self, document: &Document)

Source

pub(crate) fn containing_shadow_root(&self) -> Option<DomRoot<ShadowRoot>>

Source

pub(crate) fn set_containing_shadow_root( &self, shadow_root: Option<&ShadowRoot>, )

Source

pub(crate) fn is_in_html_doc(&self) -> bool

Source

pub(crate) fn is_connected_with_browsing_context(&self) -> bool

Source

pub(crate) fn children(&self) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn rev_children(&self) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn child_elements( &self, ) -> impl Iterator<Item = DomRoot<Element>> + use<>

Source

pub(crate) fn remove_self(&self, can_gc: CanGc)

Source

pub(crate) fn unique_id(&self, pipeline: PipelineId) -> String

Source

pub(crate) fn summarize(&self, can_gc: CanGc) -> NodeInfo

Source

pub(crate) fn insert_cell_or_row<F, G, I>( &self, index: i32, get_items: F, new_child: G, can_gc: CanGc, ) -> Fallible<DomRoot<HTMLElement>>

Used by HTMLTableSectionElement::InsertRow and HTMLTableRowElement::InsertCell

Source

pub(crate) fn delete_cell_or_row<F, G>( &self, index: i32, get_items: F, is_delete_type: G, can_gc: CanGc, ) -> ErrorResult
where F: Fn() -> DomRoot<HTMLCollection>, G: Fn(&Element) -> bool,

Used by HTMLTableSectionElement::DeleteRow and HTMLTableRowElement::DeleteCell

Source

pub(crate) fn get_stylesheet(&self) -> Option<Arc<Stylesheet>>

Source

pub(crate) fn get_cssom_stylesheet(&self) -> Option<DomRoot<CSSStyleSheet>>

Source

pub(crate) fn is_styled(&self) -> bool

Source

pub(crate) fn is_display_none(&self) -> bool

Source

pub(crate) fn style(&self) -> Option<Arc<ComputedValues>>

Source

pub(crate) fn get_lang(&self) -> Option<String>

Source

pub(crate) fn assign_slottables_for_a_tree(&self)

Source

pub(crate) fn assigned_slot(&self) -> Option<DomRoot<HTMLSlotElement>>

Source

pub(crate) fn set_assigned_slot(&self, assigned_slot: Option<&HTMLSlotElement>)

Source

pub(crate) fn manual_slot_assignment(&self) -> Option<DomRoot<HTMLSlotElement>>

Source

pub(crate) fn set_manual_slot_assignment( &self, manually_assigned_slot: Option<&HTMLSlotElement>, )

Source

pub(crate) fn parent_in_flat_tree(&self) -> Option<DomRoot<Node>>

Gets the parent of this node from the perspective of layout and style.

The returned node is the node’s assigned slot, if any, or the shadow host if it’s a shadow root. Otherwise, it is the node’s parent.

Source

pub(crate) fn inclusive_ancestors_in_flat_tree( &self, ) -> impl Iterator<Item = DomRoot<Node>> + use<>

Source

pub(crate) fn set_implemented_pseudo_element( &self, pseudo_element: PseudoElement, )

We are marking this as an implemented pseudo element.

Source

pub(crate) fn implemented_pseudo_element(&self) -> Option<PseudoElement>

Source§

impl Node

Source

pub(crate) fn reflect_node<N>( node: Box<N>, document: &Document, can_gc: CanGc, ) -> DomRoot<N>

Source

pub(crate) fn reflect_node_with_proto<N>( node: Box<N>, document: &Document, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> DomRoot<N>

Source

pub(crate) fn new_inherited(doc: &Document) -> Node

Source

pub(crate) fn new_document_node() -> Node

Source

fn new_(flags: NodeFlags, doc: Option<&Document>) -> Node

Source

pub(crate) fn adopt(node: &Node, document: &Document, can_gc: CanGc)

Source

pub(crate) fn ensure_pre_insertion_validity( node: &Node, parent: &Node, child: Option<&Node>, ) -> ErrorResult

Source

pub(crate) fn pre_insert( node: &Node, parent: &Node, child: Option<&Node>, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source

fn insert( node: &Node, parent: &Node, child: Option<&Node>, suppress_observers: SuppressObserver, can_gc: CanGc, )

Source

pub(crate) fn replace_all(node: Option<&Node>, parent: &Node, can_gc: CanGc)

Source

pub(crate) fn string_replace_all( string: DOMString, parent: &Node, can_gc: CanGc, )

Source

fn pre_remove( child: &Node, parent: &Node, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source

fn remove( node: &Node, parent: &Node, suppress_observers: SuppressObserver, can_gc: CanGc, )

Source

fn compute_attribute_value_with_style_fast_path( attr: &Dom<Attr>, elem: &Element, ) -> AttrValue

Ensure that for styles, we clone the already-parsed property declaration block. This does two things:

  1. it uses the same fast-path as CSSStyleDeclaration
  2. it also avoids the CSP checks when cloning (it shouldn’t run any when cloning existing valid attributes)
Source

pub(crate) fn clone( node: &Node, maybe_doc: Option<&Document>, clone_children: CloneChildrenFlag, can_gc: CanGc, ) -> DomRoot<Node>

Source

pub(crate) fn child_text_content(&self) -> DOMString

Source

pub(crate) fn descendant_text_content(&self) -> DOMString

Source

pub(crate) fn collect_text_contents<T: Iterator<Item = DomRoot<Node>>>( iterator: T, ) -> DOMString

Source

pub(crate) fn set_text_content_for_element( &self, value: Option<DOMString>, can_gc: CanGc, )

Source

pub(crate) fn namespace_to_string(namespace: Namespace) -> Option<DOMString>

Source

pub(crate) fn locate_namespace( node: &Node, prefix: Option<DOMString>, ) -> Namespace

Source

pub(crate) unsafe fn from_untrusted_node_address( candidate: UntrustedNodeAddress, ) -> &'static Self

If the given untrusted node address represents a valid DOM node in the given runtime, returns it.

§Safety

Callers should ensure they pass an UntrustedNodeAddress that points to a valid JSObject in memory that represents a Node.

Source

pub(crate) fn html_serialize( &self, traversal_scope: TraversalScope, serialize_shadow_roots: bool, shadow_roots: Vec<DomRoot<ShadowRoot>>, can_gc: CanGc, ) -> DOMString

Source

pub(crate) fn xml_serialize( &self, traversal_scope: TraversalScope, ) -> Fallible<DOMString>

Source

pub(crate) fn fragment_serialization_algorithm( &self, require_well_formed: bool, can_gc: CanGc, ) -> Fallible<DOMString>

Source

pub(crate) fn establishes_scrolling_box(&self) -> bool

Return true if this node establishes a “scrolling box” for the purposes of scrollIntoView.

Trait Implementations§

§

impl Castable for Node

Source§

fn is<T>(&self) -> bool
where T: DerivedFrom<Self>,

Check whether a DOM object implements one of its deriving interfaces.
Source§

fn upcast<T>(&self) -> &T
where T: Castable, Self: DerivedFrom<T>,

Cast a DOM object upwards to one of the interfaces it derives from.
Source§

fn downcast<T>(&self) -> Option<&T>
where T: DerivedFrom<Self>,

Cast a DOM object downwards to one of the interfaces it might implement.
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DomObject for Node

Source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
Source§

impl HasParent for Node

Source§

fn as_parent(&self) -> &EventTarget

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

Source§

type Parent = EventTarget

Source§

impl IDLInterface for Node

Source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
Source§

impl MallocSizeOf for Node

Source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
Source§

impl MutDomObject for Node

Source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector Read more
Source§

impl NodeMethods<DomTypeHolder> for Node

Source§

fn NodeType(&self) -> u16

Source§

fn NodeName(&self) -> DOMString

Source§

fn BaseURI(&self) -> USVString

Source§

fn IsConnected(&self) -> bool

Source§

fn GetOwnerDocument(&self) -> Option<DomRoot<Document>>

Source§

fn GetRootNode(&self, options: &GetRootNodeOptions) -> DomRoot<Node>

Source§

fn GetParentNode(&self) -> Option<DomRoot<Node>>

Source§

fn GetParentElement(&self) -> Option<DomRoot<Element>>

Source§

fn HasChildNodes(&self) -> bool

Source§

fn ChildNodes(&self, can_gc: CanGc) -> DomRoot<NodeList>

Source§

fn GetFirstChild(&self) -> Option<DomRoot<Node>>

Source§

fn GetLastChild(&self) -> Option<DomRoot<Node>>

Source§

fn GetPreviousSibling(&self) -> Option<DomRoot<Node>>

Source§

fn GetNextSibling(&self) -> Option<DomRoot<Node>>

Source§

fn GetNodeValue(&self) -> Option<DOMString>

Source§

fn SetNodeValue(&self, val: Option<DOMString>, can_gc: CanGc) -> Fallible<()>

Source§

fn GetTextContent(&self) -> Option<DOMString>

Source§

fn SetTextContent( &self, value: Option<DOMString>, can_gc: CanGc, ) -> Fallible<()>

Source§

fn InsertBefore( &self, node: &Node, child: Option<&Node>, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source§

fn AppendChild(&self, node: &Node, can_gc: CanGc) -> Fallible<DomRoot<Node>>

Source§

fn ReplaceChild( &self, node: &Node, child: &Node, can_gc: CanGc, ) -> Fallible<DomRoot<Node>>

Source§

fn RemoveChild(&self, node: &Node, can_gc: CanGc) -> Fallible<DomRoot<Node>>

Source§

fn Normalize(&self, can_gc: CanGc)

Source§

fn CloneNode(&self, subtree: bool, can_gc: CanGc) -> Fallible<DomRoot<Node>>

Source§

fn IsEqualNode(&self, maybe_node: Option<&Node>) -> bool

Source§

fn IsSameNode(&self, other_node: Option<&Node>) -> bool

Source§

fn CompareDocumentPosition(&self, other: &Node) -> u16

Source§

fn Contains(&self, maybe_other: Option<&Node>) -> bool

Source§

fn LookupPrefix(&self, namespace: Option<DOMString>) -> Option<DOMString>

Source§

fn LookupNamespaceURI(&self, prefix: Option<DOMString>) -> Option<DOMString>

Source§

fn IsDefaultNamespace(&self, namespace: Option<DOMString>) -> bool

Source§

impl PartialEq for Node

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToJSValConvertible for Node

Source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
Source§

impl Traceable for Node

Source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
Source§

impl VirtualMethods for Node

Source§

fn unbind_from_tree(&self, context: &UnbindContext<'_>, can_gc: CanGc)

Source§

fn super_type(&self) -> Option<&dyn VirtualMethods>

Returns self as the superclass of the implementation for this trait, if any.
Source§

fn children_changed(&self, mutation: &ChildrenMutation<'_>, can_gc: CanGc)

Called on the parent when its children are changed.
Source§

fn handle_event(&self, event: &Event, _: CanGc)

Called during event dispatch after the bubbling phase completes.
Source§

fn attribute_mutated( &self, attr: &Attr, mutation: AttributeMutation<'_>, can_gc: CanGc, )

Source§

fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool

Returns true if given attribute attr affects style of the given element.
Source§

fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue

Returns the right AttrValue variant for the attribute with name name on this element.
Source§

fn post_connection_steps(&self, can_gc: CanGc)

Invoked during a DOM tree mutation after a node becomes connected, once all related DOM tree mutations have been applied. https://dom.spec.whatwg.org/#concept-node-post-connection-ext
Source§

fn bind_to_tree(&self, context: &BindContext<'_>, can_gc: CanGc)

Called when a Node is appended to a tree.
Source§

fn adopting_steps(&self, old_doc: &Document, can_gc: CanGc)

Source§

fn cloning_steps( &self, copy: &Node, maybe_doc: Option<&Document>, clone_children: CloneChildrenFlag, can_gc: CanGc, )

Source§

fn pop(&self)

Called on an element when it is popped off the stack of open elements of a parser.
§

impl DerivedFrom<EventTarget> for Node

§

impl DerivedFrom<Node> for Attr

§

impl DerivedFrom<Node> for CDATASection

§

impl DerivedFrom<Node> for CharacterData

§

impl DerivedFrom<Node> for Comment

§

impl DerivedFrom<Node> for Document

§

impl DerivedFrom<Node> for DocumentFragment

§

impl DerivedFrom<Node> for DocumentType

§

impl DerivedFrom<Node> for Element

§

impl DerivedFrom<Node> for HTMLAnchorElement

§

impl DerivedFrom<Node> for HTMLAreaElement

§

impl DerivedFrom<Node> for HTMLAudioElement

§

impl DerivedFrom<Node> for HTMLBRElement

§

impl DerivedFrom<Node> for HTMLBaseElement

§

impl DerivedFrom<Node> for HTMLBodyElement

§

impl DerivedFrom<Node> for HTMLButtonElement

§

impl DerivedFrom<Node> for HTMLCanvasElement

§

impl DerivedFrom<Node> for HTMLDListElement

§

impl DerivedFrom<Node> for HTMLDataElement

§

impl DerivedFrom<Node> for HTMLDataListElement

§

impl DerivedFrom<Node> for HTMLDetailsElement

§

impl DerivedFrom<Node> for HTMLDialogElement

§

impl DerivedFrom<Node> for HTMLDirectoryElement

§

impl DerivedFrom<Node> for HTMLDivElement

§

impl DerivedFrom<Node> for HTMLDocument

§

impl DerivedFrom<Node> for HTMLElement

§

impl DerivedFrom<Node> for HTMLEmbedElement

§

impl DerivedFrom<Node> for HTMLFieldSetElement

§

impl DerivedFrom<Node> for HTMLFontElement

§

impl DerivedFrom<Node> for HTMLFormElement

§

impl DerivedFrom<Node> for HTMLFrameElement

§

impl DerivedFrom<Node> for HTMLFrameSetElement

§

impl DerivedFrom<Node> for HTMLHRElement

§

impl DerivedFrom<Node> for HTMLHeadElement

§

impl DerivedFrom<Node> for HTMLHeadingElement

§

impl DerivedFrom<Node> for HTMLHtmlElement

§

impl DerivedFrom<Node> for HTMLIFrameElement

§

impl DerivedFrom<Node> for HTMLImageElement

§

impl DerivedFrom<Node> for HTMLInputElement

§

impl DerivedFrom<Node> for HTMLLIElement

§

impl DerivedFrom<Node> for HTMLLabelElement

§

impl DerivedFrom<Node> for HTMLLegendElement

§

impl DerivedFrom<Node> for HTMLLinkElement

§

impl DerivedFrom<Node> for HTMLMapElement

§

impl DerivedFrom<Node> for HTMLMediaElement

§

impl DerivedFrom<Node> for HTMLMenuElement

§

impl DerivedFrom<Node> for HTMLMetaElement

§

impl DerivedFrom<Node> for HTMLMeterElement

§

impl DerivedFrom<Node> for HTMLModElement

§

impl DerivedFrom<Node> for HTMLOListElement

§

impl DerivedFrom<Node> for HTMLObjectElement

§

impl DerivedFrom<Node> for HTMLOptGroupElement

§

impl DerivedFrom<Node> for HTMLOptionElement

§

impl DerivedFrom<Node> for HTMLOutputElement

§

impl DerivedFrom<Node> for HTMLParagraphElement

§

impl DerivedFrom<Node> for HTMLParamElement

§

impl DerivedFrom<Node> for HTMLPictureElement

§

impl DerivedFrom<Node> for HTMLPreElement

§

impl DerivedFrom<Node> for HTMLProgressElement

§

impl DerivedFrom<Node> for HTMLQuoteElement

§

impl DerivedFrom<Node> for HTMLScriptElement

§

impl DerivedFrom<Node> for HTMLSelectElement

§

impl DerivedFrom<Node> for HTMLSlotElement

§

impl DerivedFrom<Node> for HTMLSourceElement

§

impl DerivedFrom<Node> for HTMLSpanElement

§

impl DerivedFrom<Node> for HTMLStyleElement

§

impl DerivedFrom<Node> for HTMLTableCaptionElement

§

impl DerivedFrom<Node> for HTMLTableCellElement

§

impl DerivedFrom<Node> for HTMLTableColElement

§

impl DerivedFrom<Node> for HTMLTableElement

§

impl DerivedFrom<Node> for HTMLTableRowElement

§

impl DerivedFrom<Node> for HTMLTableSectionElement

§

impl DerivedFrom<Node> for HTMLTemplateElement

§

impl DerivedFrom<Node> for HTMLTextAreaElement

§

impl DerivedFrom<Node> for HTMLTimeElement

§

impl DerivedFrom<Node> for HTMLTitleElement

§

impl DerivedFrom<Node> for HTMLTrackElement

§

impl DerivedFrom<Node> for HTMLUListElement

§

impl DerivedFrom<Node> for HTMLUnknownElement

§

impl DerivedFrom<Node> for HTMLVideoElement

§

impl DerivedFrom<Node> for Node

§

impl DerivedFrom<Node> for ProcessingInstruction

§

impl DerivedFrom<Node> for SVGElement

§

impl DerivedFrom<Node> for SVGGraphicsElement

§

impl DerivedFrom<Node> for SVGImageElement

§

impl DerivedFrom<Node> for SVGSVGElement

§

impl DerivedFrom<Node> for ShadowRoot

§

impl DerivedFrom<Node> for Text

§

impl DerivedFrom<Node> for XMLDocument

Source§

impl Eq for Node

Auto Trait Implementations§

§

impl !Freeze for Node

§

impl !RefUnwindSafe for Node

§

impl !Send for Node

§

impl !Sync for Node

§

impl Unpin for Node

§

impl !UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsVoidPtr for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<D, T> DomGlobalGeneric<D> for T
where D: DomTypes, T: DomObject,

Source§

fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>
where Self: Sized,

Returns the [GlobalScope] of the realm that the DomObject was created in. If this object is a Node, this will be different from it’s owning Document if adopted by. For Nodes it’s almost always better to use NodeTraits::owning_global.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SafeToJSValConvertible for T

Source§

fn safe_to_jsval( &self, cx: JSContext, rval: MutableHandle<'_, Value>, _can_gc: CanGc, )

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ThisReflector for T
where T: DomObject,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T