pub fn hover_agent_node(
document: &mut (impl ControlScriptBackend + ?Sized),
node_id: u64,
) -> Result<(f32, f32), DebugError>Expand description
Activate the node the caller selected, without asking hit-testing to select it a second time from a screen coordinate.
The coordinates carried by DOM events are still the node’s own geometry, because handlers use offsets and text fields use them for caret placement. They never choose the target. An overflowed or clipped node therefore gets the same pointer, mouse and click sequence as an on-screen one. Click a semantic node, by id, the way the runtime does.
Dispatches pointer, mouse and click events in browser order against the document directly, so a headless host can drive a control without a window, a pointer or a compositor. This is what makes the interaction checks runnable at all: a still picture of the tree cannot answer what a control does when it is pressed. Send one key to a document, down then up.
Only keys, deliberately. The pointer and wheel arms of the runtime’s input handler carry pointer position and button state on the runtime itself, and a headless host has no window for those to mean anything against. A key needs nothing but the document.
Escape closing a menu is a real assertion in a check suite, and it is the one
that says a control does not trap the person using it. Without this a host
answers those checks with unsupported, which is honest but leaves the
suite unable to run them at all.
Move the pointer onto a semantic node, by id.
The position comes from the node’s own box, so this needs no pointer bookkeeping and works in a host that has no window to own a cursor. A control revealed on hover cannot be reached any other way, and a defect that only appears on the second entry cannot be reached at all without it.