← Back to Page domain

Page.setDocumentContent

Sets given markup as the document's HTML.

Domain: Page stable

Parameters

NameTypeDescription
frameIdFrameIdFrame id to set HTML for.
htmlstringHTML content to set.

Example Request

{
  "id": 1,
  "method": "Page.setDocumentContent",
  "params": {
    "frameId": "ABC123DEF456",
    "html": "html-value"
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Page.setDocumentContent', {"frameId": "ABC123DEF456", "html": "html-value"});
console.log(result);