Selector

Represents a parsed CSS selector.

Constructors

this
this(string cssSelector)

Parses the selector string and returns the usable structure.

Members

Functions

getMatchingElements
Element[] getMatchingElements(Element start)

Reciprocal of Element.querySelectorAll

getMatchingElementsLazy
auto getMatchingElementsLazy(Element start, Element relativeTo)

Like getMatchingElements, but returns a lazy range. Be careful about mutating the dom as you iterate through this.

matchesElement
bool matchesElement(Element e, Element relativeTo)

Returns true if the given element matches this selector, considered relative to an arbitrary element.

parsedToString
string parsedToString()

Returns a string from the parsed result

toString
string toString()

Returns the string this was built from

Variables

components
SelectorComponent[] components;
Undocumented in source.
original
string original;
Undocumented in source.

See Also

Meta