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.

{
  "name": "beginFrame",
  "parameters": [
    {
      "name": "frameTime",
      "$ref": "Runtime.Timestamp",
      "optional": true,
      "description": "Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used."
    },
    {
      "name": "deadline",
      "$ref": "Runtime.Timestamp",
      "optional": true,
      "description": "Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval."
    },
    {
      "name": "interval",
      "type": "number",
      "optional": true,
      "description": "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."
    },
    {
      "name": "screenshot",
      "$ref": "ScreenshotParams",
      "optional": true,
      "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured."
    }
  ],
  "returns": [
    {
      "name": "hasDamage",
      "type": "boolean",
      "description": "Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display."
    },
    {
      "name": "mainFrameContentUpdated",
      "type": "boolean",
      "description": "Whether the main frame submitted a new display frame in response to this BeginFrame."
    },
    {
      "name": "screenshotData",
      "type": "string",
      "optional": true,
      "description": "Base64-encoded image data of the screenshot, if one was requested and successfully taken."
    }
  ],
  "description": "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."
}