selector
It defines the
HTML element
you want to pick from the HTML markup over the url:It's equivalent to
Document.querySelector()
and any CSS selector
can be specified, such as:- An HTML tag (e.g., 'img').
- A CSS class or pseudo class, id or data-attribute (e.g., '#avatar').
- A combination of both (e.g., 'img:first').
If you pass a collection of selectors, they are considered as fallbacks values:
Using mulitple selectors makes the data rule more generic.
The position into the collection matters: The first data rule that returns a truthy value after applying type will be used, discarding the rest of the selectors.