HeadlessExperimental

This domain provides experimental commands only supported in headless mode.

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class BeginFrameParameter(val frameTimeTicks: Double? = null, val interval: Double? = null, val noDisplayUpdates: Boolean? = null, val screenshot: HeadlessExperimental.ScreenshotParams? = null)
Link copied to clipboard
@Serializable
data class BeginFrameReturn(val hasDamage: Boolean, val screenshotData: String?)
Link copied to clipboard
@Serializable
data class ScreenshotParams(val format: String? = null, val quality: Int? = null, val optimizeForSpeed: Boolean? = null)

Encoding options for a screenshot.

Functions

Link copied to clipboard
suspend fun beginFrame(frameTimeTicks: Double? = null, interval: Double? = null, noDisplayUpdates: Boolean? = null, screenshot: HeadlessExperimental.ScreenshotParams? = null): HeadlessExperimental.BeginFrameReturn

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. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background.

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disables headless events for the target.

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

Enables headless events for the target.