AttributeSelector class

An attribute selector such as [href^="https"].

Inheritance
Available extensions

Constructors

AttributeSelector({required String attributeName, required AttrOp operation, String? value, RegExp? regexp, bool caseInsensitive = false})
Creates an attribute selector.

Properties

attributeName String
The attribute name.
final
caseInsensitive bool
Whether the comparison ignores case (the i flag).
final
hashCode int
The hash code for this object.
no setterinherited
operation AttrOp
The comparison operator.
final
pseudoElement String
The pseudo-element attached to this selector, or '' if there is none.
no setterinherited
regexp RegExp?
The compiled pattern for AttrOp.regexMatch.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
specificity Specificity
The specificity of this selector as an (a, b, c) triple.
no setteroverride
support MatchSupport
How well this selector can be evaluated. See MatchSupport.
no setterinherited
undecidableParts Set<String>
The names of any parts of this selector that are not fully decidable.
no setterinherited
value String?
The value being compared against, if the operator takes one.
final

Methods

asFunction() Selector

Available on Sel, provided by the SelAdapter extension

Returns this selector as a callable predicate.
asFunctionWith(MatchContext context) Selector

Available on Sel, provided by the SelAdapter extension

Returns this selector as a predicate bound to context.
match(Node node) bool
Whether node matches this selector, using no runtime context.
inherited
matchElement(Element element, MatchContext context) bool
Whether element matches. Implemented by concrete selectors.
override
matchWith(Node node, MatchContext context) bool
Whether node matches, using the runtime facts in context.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
The CSS text of this selector.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited