← Back to Page domain

Page.createIsolatedWorld

Creates an isolated world for the given frame.

Domain: Page stable

Parameters

NameTypeDescription
frameIdFrameIdId of the frame in which the isolated world should be created.
worldName (optional)stringAn optional name which is reported in the Execution Context.
grantUniveralAccess (optional)booleanWhether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.

Returns

NameTypeDescription
executionContextIdRuntime.ExecutionContextIdExecution context of the isolated world.

Example Request

{
  "id": 1,
  "method": "Page.createIsolatedWorld",
  "params": {
    "frameId": "ABC123DEF456"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "executionContextId": "executionContextId-value"
  }
}

Usage in Node.js

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