ParentNodeExtensions
Useful methods for parent node objects.
Gets the ancestor nodes of the given child.
Gets the ancestor nodes of the given child.
public static TElement AppendElement<TElement>(this INode parent, TElement element) where TElement : IElement
Inserts a node as the last child node of this element.
Appends nodes to parent node.
Gets the descendant nodes of the given parent.
Gets the descendant nodes of the given parent.
Gets the descendant nodes including itself of the given parent.
Gets the descendant nodes including itself of the given parent.
Gets the descendant nodes of the given parent.
Gets the descendant nodes of the given parent.
Gets the descendant nodes including itself of the given parent.
Gets the descendant nodes including itself of the given parent.
Inserts nodes after the given child.
Inserts nodes before the given child.
public static TElement InsertElement<TElement>(this INode parent, TElement newElement, INode referenceElement) where TElement : IElement
Inserts the newElement immediately before the referenceElement.
Prepends nodes to the parent node.
public static TElement QuerySelector<TElement>(this IParentNode parent, string selectors) where TElement : IElement
Returns the first element matching the selectors with the provided
type, or null.
public static IEnumerable<TElement> QuerySelectorAll<TElement>(this IParentNode parent, string selectors) where TElement : IElement
Returns a list of elements matching the selectors with the
provided type.
public static TElement RemoveElement<TElement>(this INode parent, TElement element) where TElement : IElement
Removes a child node from the current element, which must be a
child of the current node.
Removes the child from its parent.
Replaces the given child with the nodes.