SelectorExtensions
Defines a set of extension methods involving selectors.
public static IEnumerable<IElement> Children(this IEnumerable<IElement> elements, string selectorText = null)
Gets the children of the provided elements. Optionally uses a CSS
selector to filter the results.
public static IEnumerable<IElement> Children(this IEnumerable<IElement> elements, ISelector selector = null)
Gets the children of the provided elements. Optionally uses a CSS
selector to filter the results.
Reduces the elements to the one at the given index, if any.
Reduces the elements to the ones with even index.
public static IEnumerable<T> Filter<T>(this IEnumerable<T> elements, string selectorText) where T : IElement
Keeps elements that are matched by the provided selector.
Reduces the elements to the ones above the given index.
public static IEnumerable<T> Is<T>(this IEnumerable<T> elements, ISelector selector) where T : IElement
Keeps elements that are matched by the provided selector.
Reduces the elements to the ones below the given index.
public static IEnumerable<IElement> Next(this IEnumerable<IElement> elements, string selectorText = null)
Gets the following siblings of the provided elements. Optionally
uses a CSS selector to filter the results.
public static IEnumerable<IElement> Next(this IEnumerable<IElement> elements, ISelector selector = null)
Gets the following siblings of the provided elements. Optionally
uses a CSS selector to filter the results.
public static IEnumerable<T> Not<T>(this IEnumerable<T> elements, string selectorText) where T : IElement
Keeps elements that are not matched by the provided selector.
public static IEnumerable<T> Not<T>(this IEnumerable<T> elements, ISelector selector) where T : IElement
Keeps elements that are not matched by the provided selector.
Reduces the elements to the ones with odd index.
public static IEnumerable<IElement> Parent(this IEnumerable<IElement> elements, string selectorText = null)
Gets the parents of the provided elements. Optionally uses a CSS
selector to filter the results.
public static IEnumerable<IElement> Parent(this IEnumerable<IElement> elements, ISelector selector = null)
Gets the parents of the provided elements. Optionally uses a CSS
selector to filter the results.
public static IEnumerable<IElement> Previous(this IEnumerable<IElement> elements, string selectorText = null)
Gets the preceding siblings of the provided elements. Optionally
uses a CSS selector to filter the results.
public static IEnumerable<IElement> Previous(this IEnumerable<IElement> elements, ISelector selector = null)
Gets the preceding siblings of the provided elements. Optionally
uses a CSS selector to filter the results.
public static IEnumerable<IElement> Siblings(this IEnumerable<IElement> elements, string selectorText = null)
Gets the siblings of the provided elements. Optionally uses a CSS
selector to filter the results.
public static IEnumerable<IElement> Siblings(this IEnumerable<IElement> elements, ISelector selector = null)
Gets the siblings of the provided elements. Optionally uses a CSS
selector to filter the results.