Skip to main content

Module page

Module page 

Expand description

Typed requests against a live page’s content.

Browser chrome turns its page actions into a PageRequest; the engine answers with exactly one WebViewEvent::PageResult carrying the same request id. Elements are addressed by the refs a prior PageRequest::Outline printed. A ref names one element of one document, so a ref from a page the tab has since left is refused rather than resolved against whatever now sits at the same position.

A page inside a frame is addressed by the frame id its parent’s outline printed ([frame=1], [frame=1.2] for a frame of a frame): a request with that id runs in the frame’s own document, and its refs and outline describe that document alone.

Structs§

FrameId
A frame’s place in the page: the id its parent’s outline printed, a dot between the numbers of nested frames (2, then 2.1), at most eight deep.
PageFailure
Why a page request did nothing. code is stable, such as stale_element, obscured or unavailable.
PageKey
One key plus modifiers, written as a chord such as Enter, Shift+Tab or Control+a.
PageReply
What a completed page request observed.
PointerStep
One step of a PageRequest::Pointer gesture.

Enums§

PageNavigation
Whether a page request led the page to another document, as far as the engine can tell when it answers.
PageRequest
PointerButton
PointerPoint
Where a step happens: inside an element’s box or at a viewport point.
PointerStepKind
ScrollTarget
Where a PageRequest::Scroll goes instead of a distance.

Constants§

MAX_CAPTURE_BYTES
Upper bound on the pixels one capture may carry, as a PNG. What the engine paints is bounded the same way before it ever reaches this boundary.
MAX_CAPTURE_WIDTH
The widest picture a capture paints; a wider request is scaled down to it, so a picture is never larger than a person could look at.
MAX_DATA_BYTES
Upper bound on structured reply data (PageReply::data), serialised.
MAX_DRAG_STEPS
MAX_FILE_PATHS
Upper bound on the files one fill of a file input may choose.
MAX_FILE_PATH_BYTES
Upper bound on one chosen file’s path.
MAX_FILL_BYTES
Upper bound on the text one fill may insert.
MAX_FIND_NAME_BYTES
Upper bound on the accessible name a PageRequest::Find matches, as the outline prints it.
MAX_FIND_ROLE_BYTES
Upper bound on the role words a PageRequest::Find matches: a few words of the outline’s own vocabulary, never a selector.
MAX_OUTLINE_BYTES
Upper bound on an outline as it crosses the engine boundary.
MAX_PATH_POINTS
Upper bound on the points of one pointer path, and the steps of one drag, so a gesture is always a bounded amount of work for the engine.
MAX_POINTER_STEPS
Upper bound on the steps of one pointer gesture.
MAX_SCROLL_BY
How far one scroll may ask to travel in one go, CSS pixels: a wheel notch moves about 100, and a bounded distance keeps one request a bounded amount of work for the page.
MAX_SELECT_VALUES
Upper bound on the options one select may choose.
MAX_SELECT_VALUE_BYTES
Upper bound on one option value or label.
MAX_SETTLE_MS
MIN_SETTLE_QUIET_MS
Bounds of a settle wait, milliseconds.

Functions§

is_element_ref
Element refs are d<document>e<element>: both parts are decimal, so a ref can never smuggle selector or script syntax to the engine.