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, then2.1), at most eight deep. - Page
Failure - Why a page request did nothing.
codeis stable, such asstale_element,obscuredorunavailable. - PageKey
- One key plus modifiers, written as a chord such as
Enter,Shift+TaborControl+a. - Page
Reply - What a completed page request observed.
- Pointer
Step - One step of a
PageRequest::Pointergesture.
Enums§
- Page
Navigation - Whether a page request led the page to another document, as far as the engine can tell when it answers.
- Page
Request - Pointer
Button - Pointer
Point - Where a step happens: inside an element’s box or at a viewport point.
- Pointer
Step Kind - Scroll
Target - Where a
PageRequest::Scrollgoes 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::Findmatches, as the outline prints it. - MAX_
FIND_ ROLE_ BYTES - Upper bound on the role words a
PageRequest::Findmatches: 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.