Module dom_apis

Source
Expand description

Generic implementations of some DOM APIs so they can be shared between Servo and Gecko.

Structsยง

QueryAll
A query for all the elements in a subtree.
QueryFirst
A query for the first in-tree match of all the elements in a subtree.
QuerySelectorProcessor ๐Ÿ”’

Enumsยง

MayUseInvalidation
Whether the invalidation machinery should be used for this query.
SimpleFilter ๐Ÿ”’

Traitsยง

SelectorQuery
A selector query abstraction, in order to be generic over QuerySelector and QuerySelectorAll.

Functionsยง

collect_all_elements ๐Ÿ”’
collect_elements_with_id ๐Ÿ”’
Collects elements with a given id under root, that pass filter.
connected_element_is_descendant_of ๐Ÿ”’
Returns whether a given element connected to root is descendant of root.
element_closest
https://dom.spec.whatwg.org/#dom-element-closest
element_matches
https://dom.spec.whatwg.org/#dom-element-matches
fast_connected_elements_with_id ๐Ÿ”’
Fast path for iterating over every element with a given id in the document or shadow root that root is connected to.
get_attr_name ๐Ÿ”’
get_id ๐Ÿ”’
has_attr ๐Ÿ”’
local_name_matches ๐Ÿ”’
query_selector
https://dom.spec.whatwg.org/#dom-parentnode-queryselector
query_selector_fast ๐Ÿ”’
Fast paths for a given selector query.
query_selector_single_query ๐Ÿ”’
Fast paths for querySelector with a single simple selector.
query_selector_slow ๐Ÿ”’

Type Aliasesยง

QuerySelectorAllResult
The result of a querySelectorAll call.