QueryExtensions
Extensions for performing QuerySelector operations.
Returns true if the underlying string contains all of the tokens, otherwise false.
public static IHtmlCollection<IElement> GetElementsByClassName(this INodeList elements, string classNames)
Returns a set of elements which have all the given class names.
public static IHtmlCollection<IElement> GetElementsByTagName(this INodeList elements, string tagName)
Returns a NodeList of elements with the given tag name. The complete document is searched, including the root node.
public static IHtmlCollection<IElement> GetElementsByTagName(this INodeList elements, string namespaceUri, string localName)
Returns a list of elements with the given tag name belonging to the given namespace.
The complete document is searched, including the root node.
public static IElement QuerySelector(this INodeList nodes, string selectorText, INode scopeNode = null)
Returns the first element within the document (using depth-first pre-order traversal
of the document's nodes) that matches the specified group of selectors.
Requires either a non-empty nodelist or a valid scope node.
Returns the first element within the document (using depth-first pre-order traversal
of the document's nodes) that matches the given selector.
Returns the first element within the document (using depth-first pre-order traversal
of the document's nodes) that matches the specified group of selectors.
public static IHtmlCollection<IElement> QuerySelectorAll(this INodeList nodes, string selectorText, INode scopeNode = null)
Returns a list of the elements within the document (using depth-first pre-order traversal
of the document's nodes) that match the specified group of selectors.
Requires either a non-empty nodelist or a valid scope node.
public static IHtmlCollection<IElement> QuerySelectorAll(this INodeList elements, ISelector selector)
Returns a list of the elements within the document (using depth-first pre-order traversal
of the document's nodes) that matches the selector.
public static void QuerySelectorAll(this INodeList elements, ISelector selector, List<IElement> result)
Returns a list of the elements within the document (using depth-first pre-order traversal
of the document's nodes) that match the specified group of selectors.