Skip to content

CDP support matrix

The Frame Agent emulates a subset of the Chrome DevTools Protocol against the real DOM. It registers exactly the domains and methods below; every other command returns a CDP error. The lists here are the cdp.register(...) calls in src/frame/index.ts — not the wider CDP surface a real browser exposes.

Browser- and Target-level registry methods (Target.getTargets, Target.attachToTarget, Target.setAutoAttach, Browser.getVersion, …) are answered by the Relay, not the Frame Agent. They read the Relay's own session and Target state and never reach the iframe. See the Relay reference for that list and the flat-session protocol for how Clients address Targets.

Implemented domains

Accessibility

MethodBehavior
disableNo-op.
enableNo-op.
getFullAXTreeFull accessibility tree, honoring depth.
getPartialAXTreeSubtree at a node; fetchRelatives defaults to true.
getRootAXNodeThe root AX node.
getChildAXNodesChild AX nodes of a given AX node id.
getAXNodeAndAncestorsA node and its ancestor chain; requires a nodeId or backendNodeId.
queryAXTreeAX nodes under a target, filtered by accessibleName and role.

See Accessibility tree for how the tree is computed and where it diverges from Chromium.

Animation

MethodBehavior
enableNo-op.

Autofill

MethodBehavior
setAddressesNo-op.

CSS

MethodBehavior
disableNo-op.
enableNo-op.
getComputedStyleForNodeComputed style for a node as { name, value } pairs.

DOM

The DOM domain unifies nodeId with backendNodeId, so either resolves the same node.

MethodBehavior
describeNodeDescribe a node by backendNodeId/nodeId (defaults to node 1).
discardSearchResultsDrop a stored search by searchId.
enableNo-op.
focusFocus an HTMLElement by node id.
getAttributesFlat [name, value, …] attribute list for an element.
getBoxModelBox model from getBoundingClientRect (content/padding/border/margin share the rect).
getContentQuadsSingle content quad derived from the box model.
getDocumentDocument root, honoring depth (defaults to 1).
getOuterHTMLouterHTML of an element or document.
getSearchResultsSlice stored search node ids by fromIndex/toIndex.
performSearchMatch by CSS selector, falling back to case-insensitive text search; returns a searchId.
pushNodesByBackendIdsToFrontendEcho the requested backendNodeIds as node ids.
querySelectorFirst match under a root node (or document); 0 when none.
querySelectorAllAll matches under a root node (or document).
requestChildNodesEmit DOM.setChildNodes for a node's children at depth (defaults to 1).
resolveNodeWrap a node id as a backend:<id> remote object.
scrollIntoViewIfNeededScroll the element to block/inline center.

Input

MethodBehavior
dispatchKeyEventDispatch keydown/keyup; Backspace deletes backward and text is inserted into the active element.
dispatchMouseEventResolve the target via elementFromPoint, then dispatch move/over/enter, down, up + synthetic click/dblclick, or wheel + scroll.
insertTextInsert text into the active input, textarea, or contenteditable element.

WARNING

dispatchMouseEvent resolves the target with document.elementFromPoint. A below-the-fold element must be scrolled into view first, or the click silently misses. See Drive with agent-browser.

Network

MethodBehavior
emulateNetworkConditionsByRuleReturns synthetic ruleIds for the matched conditions; applies no real throttling.
overrideNetworkStateNo-op.
setBlockedURLsNo-op.

Page

MethodBehavior
addScriptToEvaluateOnNewDocumentReturns a synthetic identifier; no script is installed.
getFrameTreeSingle-frame tree for the embedded document.
getResourceTreeFrame tree with an empty resources list.
navigateSame-origin only. Navigating outside the embedded app's origin throws.

INFO

navigate sets location.href for a same-origin URL. A cross-origin URL throws — the embedded app's origin is the navigation boundary. Reloads and same-origin navigations keep the same targetId; see Target lifecycle.

Runtime

MethodBehavior
addBindingNo-op.
callFunctionOnIndirect-eval a function declaration against a backend:<id> object or window; supports awaitPromise.
enableEmits Runtime.executionContextCreated (context id 1, name top) and flushes queued events.
evaluateIndirect-eval an expression; supports awaitPromise.
runIfWaitingForDebuggerNo-op.

Runtime events (including Runtime.consoleAPICalled from the console bridge) are queued until Runtime.enable, capped at ~200, then flushed. The single execution context has id 1 and name top.

Storage

MethodBehavior
getStorageKeyReturns the document origin as the storageKey.

No-op methods

These are registered so domain enables and setup calls succeed, but they have no effect:

  • Animation.enable
  • Autofill.setAddresses
  • Network.overrideNetworkState
  • Network.setBlockedURLs
  • Runtime.addBinding
  • Runtime.runIfWaitingForDebugger

The disable/enable handlers on Accessibility and CSS, and DOM.enable, are also no-ops; the Frame Agent holds no per-domain state to toggle. (DOM.disable is not registered.)

Unknown methods

A method the Frame Agent has not registered returns a CDP error with code -32000 (CDP_SERVER_ERROR) and message Method not found: <method>. Commands in flight when the document dies fail with the same code. See the Frame reference for the full request path and the protocol reference for the error constants.

Intentionally unsupported

Page JavaScript cannot provide these capabilities, so they are out of scope by design — not pending work:

  • Screenshots
  • PDF generation
  • File uploads
  • Drag-and-drop
  • Dialogs
  • Real network interception

The compatibility bar is agent-browser's support matrix: AX-tree snapshots, semantic locators, click/fill/type, eval, waits, console, and SPA history. Raw Playwright over connectOverCDP is best-effort, not promised — it exercises commands outside this matrix and will hit the unknown-method error above.

Released under the MIT License.