stable (1.2) latest (tip-of-tree) v8-inspector (node) Home
Domains
Accessibility Animation ApplicationCache Audits Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeadlessExperimental HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Performance Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

HeadlessExperimental Domain

This domain provides experimental commands only supported in headless mode.

Experimental

Methods

HeadlessExperimental.enable

Enables headless events for the target.

HeadlessExperimental.disable

Disables headless events for the target.

HeadlessExperimental.beginFrame

Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl.

Parameters
frameTime
Runtime.Timestamp Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used.
deadline
Runtime.Timestamp Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval.
interval
number The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
screenshot
ScreenshotParams If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured.
Return object
hasDamage
boolean Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
screenshotData
string Base64-encoded image data of the screenshot, if one was requested and successfully taken.

Events

HeadlessExperimental.needsBeginFramesChanged

Issued when the target starts or stops needing BeginFrames.

Parameters
needsBeginFrames
boolean True if BeginFrames are needed, false otherwise.

HeadlessExperimental.mainFrameReadyForScreenshots

Issued when the main frame has first submitted a frame to the browser. May only be fired while a BeginFrame is in flight. Before this event, screenshotting requests may fail.

Types

ScreenshotParams

Encoding options for a screenshot.

Type: object

Properties
format
string Image compression format (defaults to png). Allowed values: jpeg, png.
quality
integer Compression quality from range [0..100] (jpeg only).