Expand description
Selector-engine injection and element resolution.
The engine JS (INJECTED_SCRIPT) is registered on self.__pwcdpInjected
and exposes querySelectorAll(root, selector), querySelector, and
elementState(el). Resolution here goes through Runtime.callFunctionOn and
returns CDP RemoteObjectIds; we resolve a single node at a time to avoid
materializing (and leaking) handles for every match.
Constants§
- INJECTED_
SCRIPT - The injected selector-engine bundle, embedded at compile time.
Functions§
- count
- Count elements matching
selectorin the given execution context. - element_
at - Resolve a single element (by index) to its
RemoteObjectId, orNoneif no element exists at that index.