PureHTML.Query.Selector.AttributeSelector (PureHTML v0.4.0)

View Source

Represents an attribute selector like [href] or [href^="https"].

Summary

Functions

Checks if an attribute value matches this selector.

Types

match_type()

@type match_type() :: :exists | :equal | :prefix | :suffix | :substring

t()

@type t() :: %PureHTML.Query.Selector.AttributeSelector{
  match_type: match_type(),
  name: String.t(),
  value: String.t() | nil
}

Functions

match?(value, attribute_selector)

@spec match?(String.t() | nil, t()) :: boolean()

Checks if an attribute value matches this selector.