Selector

Represents a parsed CSS selector. You never have to use this directly, but you can if you know it is going to be reused a lot to avoid a bit of repeat parsing.

Constructors

this
this(string cssSelector)

Parses the selector string and constructs the usable structure.

Members

Functions

getMatchingElements
Element[] getMatchingElements(Element start, Element relativeTo)

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

See Also

Meta