Newer
Older
"domains": [{
"domain": "Inspector",
"types": [],
"commands": [
{
"name": "enable",
"description": "Enables inspector domain notifications."
},
{
"name": "disable",
"description": "Disables inspector domain notifications."
}
],
"events": [
{
"name": "detached",
"description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
"parameters": [
{ "name": "reason", "type": "string", "description": "The reason why connection has been terminated." }
},
{
"name": "targetCrashed",
"description": "Fired when debugging target has crashed"
}
]
},
{
"domain": "Memory",
"experimental": true,
"types": [
{
"id": "PressureLevel",
"type": "string",
"enum": ["moderate", "critical"],
"description": "Memory pressure level."
}
],
"commands": [
{
"name": "getDOMCounters",
"returns": [
{ "name": "documents", "type": "integer" },
{ "name": "nodes", "type": "integer" },
{ "name": "jsEventListeners", "type": "integer" }
]
},
{
"name": "setPressureNotificationsSuppressed",
"description": "Enable/disable suppressing memory pressure notifications in all processes.",
"parameters": [
{ "name": "suppressed", "type": "boolean", "description": "If true, memory pressure notifications will be suppressed."}
]
},
{
"name": "simulatePressureNotification",
"description": "Simulate a memory pressure notification in all processes.",
"parameters": [
{ "name": "level", "$ref": "PressureLevel", "description": "Memory pressure level of the notification." }
]
}
]
},
{
"domain": "Page",
"description": "Actions and events related to the inspected page belong to the page domain.",
"types": [
{
"id": "ResourceType",
"type": "string",
"enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"],
"description": "Resource type as it was perceived by the rendering engine."
},
{
"id": "FrameId",
"type": "string",
"description": "Unique frame identifier."
},
{
"id": "Frame",
"type": "object",
"description": "Information about the Frame on the page.",
"properties": [
{ "name": "id", "type": "string", "description": "Frame unique identifier." },
{ "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." },
{ "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." },
{ "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." },
{ "name": "url", "type": "string", "description": "Frame document's URL." },
{ "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." },
{ "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." }
]
},
{
"id": "FrameResource",
"type": "object",
"description": "Information about the Resource on the page.",
"properties": [
{ "name": "url", "type": "string", "description": "Resource URL." },
{ "name": "type", "$ref": "ResourceType", "description": "Type of this resource." },
{ "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
{ "name": "lastModified", "$ref": "Network.Timestamp", "description": "last-modified timestamp as reported by server.", "optional": true },
{ "name": "contentSize", "type": "number", "description": "Resource content size.", "optional": true },
{ "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." },
{ "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." }
],
"experimental": true
},
{
"id": "FrameResourceTree",
"type": "object",
"description": "Information about the Frame hierarchy along with their cached resources.",
"properties": [
{ "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." },
{ "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." },
{ "name": "resources", "type": "array", "items": { "$ref": "FrameResource" }, "description": "Information about frame resources." }
],
"experimental": true
},
{
"id": "ScriptIdentifier",
"type": "string",
"description": "Unique script identifier.",
{
"id": "TransitionType",
"type": "string",
"description": "Transition type.",
"experimental": true,
"enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated", "other"]
},
{
"id": "NavigationEntry",
"type": "object",
"description": "Navigation history entry.",
"properties": [
{ "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." },
{ "name": "url", "type": "string", "description": "URL of the navigation history entry." },
{ "name": "userTypedURL", "type": "string", "description": "URL that the user typed in the url bar." },
{ "name": "title", "type": "string", "description": "Title of the navigation history entry." },
{ "name": "transitionType", "$ref": "TransitionType", "description": "Transition type." }
},
{
"id": "ScreencastFrameMetadata",
"type": "object",
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
"description": "Screencast frame metadata.",
"properties": [
{ "name": "offsetTop", "type": "number", "experimental": true, "description": "Top offset in DIP." },
{ "name": "pageScaleFactor", "type": "number", "experimental": true, "description": "Page scale factor." },
{ "name": "deviceWidth", "type": "number", "experimental": true, "description": "Device screen width in DIP." },
{ "name": "deviceHeight", "type": "number", "experimental": true, "description": "Device screen height in DIP." },
{ "name": "scrollOffsetX", "type": "number", "experimental": true, "description": "Position of horizontal scroll in CSS pixels." },
{ "name": "scrollOffsetY", "type": "number", "experimental": true, "description": "Position of vertical scroll in CSS pixels." },
{ "name": "timestamp", "type": "number", "optional": true, "experimental": true, "description": "Frame swap timestamp." }
],
"experimental": true
},
{
"id": "DialogType",
"description": "Javascript dialog type.",
"type": "string",
"enum": ["alert", "confirm", "prompt", "beforeunload"],
"experimental": true
},
{
"id": "AppManifestError",
"description": "Error while paring app manifest.",
"type": "object",
"properties": [
{ "name": "message", "type": "string", "description": "Error message." },
{ "name": "critical", "type": "integer", "description": "If criticial, this is a non-recoverable parse error." },
{ "name": "line", "type": "integer", "description": "Error line." },
{ "name": "column", "type": "integer", "description": "Error column." }
],
"experimental": true
},
{
"id": "NavigationResponse",
"description": "Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made.",
"type": "string",
"enum": ["Proceed", "Cancel", "CancelAndIgnore"],
"experimental": true
},
{
"id": "LayoutViewport",
"type": "object",
"description": "Layout viewport position and dimensions.",
"experimental": true,
"properties": [
{ "name": "pageX", "type": "integer", "description": "Horizontal offset relative to the document (CSS pixels)." },
{ "name": "pageY", "type": "integer", "description": "Vertical offset relative to the document (CSS pixels)." },
{ "name": "clientWidth", "type": "integer", "description": "Width (CSS pixels), excludes scrollbar if present." },
{ "name": "clientHeight", "type": "integer", "description": "Height (CSS pixels), excludes scrollbar if present." }
]
},
{
"id": "VisualViewport",
"type": "object",
"description": "Visual viewport position, dimensions, and scale.",
"experimental": true,
"properties": [
{ "name": "offsetX", "type": "number", "description": "Horizontal offset relative to the layout viewport (CSS pixels)." },
{ "name": "offsetY", "type": "number", "description": "Vertical offset relative to the layout viewport (CSS pixels)." },
{ "name": "pageX", "type": "number", "description": "Horizontal offset relative to the document (CSS pixels)." },
{ "name": "pageY", "type": "number", "description": "Vertical offset relative to the document (CSS pixels)." },
{ "name": "clientWidth", "type": "number", "description": "Width (CSS pixels), excludes scrollbar if present." },
{ "name": "clientHeight", "type": "number", "description": "Height (CSS pixels), excludes scrollbar if present." },
{ "name": "scale", "type": "number", "description": "Scale relative to the ideal viewport (size at width=device-width)." }
]
}
],
"commands": [
{
"name": "enable",
"description": "Enables page domain notifications."
},
{
"name": "disable",
"description": "Disables page domain notifications."
},
{
"name": "addScriptToEvaluateOnLoad",
"parameters": [
{ "name": "scriptSource", "type": "string" }
],
"returns": [
{ "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." }
],
},
{
"name": "removeScriptToEvaluateOnLoad",
"parameters": [
{ "name": "identifier", "$ref": "ScriptIdentifier" }
],
"experimental": true
},
{
"name": "setAutoAttachToCreatedPages",
"parameters": [
{ "name": "autoAttach", "type": "boolean", "description": "If true, browser will open a new inspector window for every page created from this one." }
],
"description": "Controls whether browser will open a new inspector window for connected pages.",
"experimental": true
},
{
"name": "reload",
"parameters": [
{ "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." },
{ "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }
],
"description": "Reloads given page optionally ignoring the cache."
},
{
"name": "navigate",
"parameters": [
{ "name": "url", "type": "string", "description": "URL to navigate the page to." },
{ "name": "referrer", "type": "string", "optional": true, "experimental": true, "description": "Referrer URL." },
{ "name": "transitionType", "$ref": "TransitionType", "optional": true, "experimental": true, "description": "Intended transition type." }
],
"returns": [
{ "name": "frameId", "$ref": "FrameId", "experimental": true, "description": "Frame id that will be navigated." }
"description": "Navigates current page to the given URL."
},
{
"name": "stopLoading",
"description": "Force the page stop all navigations and pending resource fetches.",
"experimental": true
},
{
"name": "getNavigationHistory",
"returns": [
{ "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." },
{ "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry" }, "description": "Array of navigation history entries." }
],
"description": "Returns navigation history for the current page.",
},
{
"name": "navigateToHistoryEntry",
"parameters": [
{ "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." }
],
"description": "Navigates current page to the given history entry.",
},
{
"name": "getCookies",
"returns": [
{ "name": "cookies", "type": "array", "items": { "$ref": "Network.Cookie" }, "description": "Array of cookie objects." }
],
"description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.",
"redirect": "Network"
},
{
"name": "deleteCookie",
"parameters": [
{ "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
{ "name": "url", "type": "string", "description": "URL to match cooke domain and path." }
],
"description": "Deletes browser cookie with given name, domain and path.",
"redirect": "Network"
},
{
"name": "getResourceTree",
"description": "Returns present frame / resource tree structure.",
"returns": [
{ "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." }
],
},
{
"name": "getResourceContent",
"description": "Returns content of the given resource.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." },
{ "name": "url", "type": "string", "description": "URL of the resource to get content for." }
],
"returns": [
{ "name": "content", "type": "string", "description": "Resource content." },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." }
],
},
{
"name": "searchInResource",
"description": "Searches for given string in resource content.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." },
{ "name": "url", "type": "string", "description": "URL of the resource to search in." },
{ "name": "query", "type": "string", "description": "String to search for." },
{ "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
{ "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
],
"returns": [
{ "name": "result", "type": "array", "items": { "$ref": "Debugger.SearchMatch" }, "description": "List of search matches." }
],
},
{
"name": "setDocumentContent",
"description": "Sets given markup as the document's HTML.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." },
{ "name": "html", "type": "string", "description": "HTML content to set." }
],
},
{
"name": "setDeviceMetricsOverride",
"description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
"parameters": [
{ "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
{ "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
{ "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." },
{ "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
{ "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
{ "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
{ "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." },
{ "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." },
{ "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenOrientation", "$ref": "Emulation.ScreenOrientation", "optional": true, "description": "Screen orientation override." }
],
"redirect": "Emulation",
},
{
"name": "clearDeviceMetricsOverride",
"description": "Clears the overriden device metrics.",
"redirect": "Emulation",
},
{
"name": "setGeolocationOverride",
"description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
"parameters": [
{ "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
{ "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
{ "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
],
},
{
"name": "clearGeolocationOverride",
"description": "Clears the overriden Geolocation Position and Error.",
},
{
"name": "setDeviceOrientationOverride",
"description": "Overrides the Device Orientation.",
"parameters": [
{ "name": "alpha", "type": "number", "description": "Mock alpha"},
{ "name": "beta", "type": "number", "description": "Mock beta"},
{ "name": "gamma", "type": "number", "description": "Mock gamma"}
],
"redirect": "DeviceOrientation",
},
{
"name": "clearDeviceOrientationOverride",
"description": "Clears the overridden Device Orientation.",
"redirect": "DeviceOrientation",
},
{
"name": "setTouchEmulationEnabled",
"parameters": [
{ "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." },
{ "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." }
],
"description": "Toggles mouse event-based touch event emulation.",
"experimental": true,
"redirect": "Emulation"
},
{
"name": "captureScreenshot",
"description": "Capture page screenshot.",
"parameters": [
{ "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format (defaults to png)." },
{ "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100] (jpeg only)." },
{ "name": "fromSurface", "type": "boolean", "optional": true, "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", "experimental": true }
"returns": [
{ "name": "data", "type": "string", "description": "Base64-encoded image data." }
"description": "Print page as PDF.",
"parameters": [
{"name": "landscape", "type": "boolean", "optional": true, "description": "Paper orientation. Defaults to false."},
{"name": "displayHeaderFooter", "type": "boolean", "optional": true, "description": "Display header and footer. Defaults to false."},
{"name": "printBackground", "type": "boolean", "optional": true, "description": "Print background graphics. Defaults to false."},
{"name": "scale", "type": "number", "optional": true, "description": "Scale of the webpage rendering. Defaults to 1."},
{"name": "paperWidth", "type": "number", "optional": true, "description": "Paper width in inches. Defaults to 8.5 inches."},
{"name": "paperHeight", "type": "number", "optional": true, "description": "Paper height in inches. Defaults to 11 inches."},
{"name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inches. Defaults to 1cm (~0.4 inches)."},
{"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches)."},
{"name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inches. Defaults to 1cm (~0.4 inches)."},
{"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inches. Defaults to 1cm (~0.4 inches)."},
{"name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages."}
],
"returns": [
{ "name": "data", "type": "string", "description": "Base64-encoded pdf data." }
},
{
"name": "startScreencast",
"description": "Starts sending each frame using the <code>screencastFrame</code> event.",
"parameters": [
{ "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." },
{ "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." },
{ "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." },
{ "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." },
{ "name": "everyNthFrame", "type": "integer", "optional": true, "description": "Send every n-th frame." }
},
{
"name": "stopScreencast",
"description": "Stops sending each frame in the <code>screencastFrame</code>.",
},
{
"name": "screencastFrameAck",
"description": "Acknowledges that a screencast frame has been received by the frontend.",
"parameters": [
{ "name": "sessionId", "type": "integer", "description": "Frame number." }
},
{
"name": "handleJavaScriptDialog",
"description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
"parameters": [
{ "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
{ "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
"name": "getAppManifest",
"experimental": true,
"returns": [
{ "name": "url", "type": "string", "description": "Manifest location." },
{ "name": "errors", "type": "array", "items": { "$ref": "AppManifestError" } },
{ "name": "data", "type": "string", "optional": true, "description": "Manifest content." }
]
},
{
"name": "requestAppBanner",
"experimental": true
},
{
"name": "setControlNavigations",
"parameters": [
"description": "Toggles navigation throttling which allows programatic control over navigation and redirect response.",
"experimental": true
"parameters": [
{ "name": "response", "$ref": "NavigationResponse" },
{ "name": "navigationId", "type": "integer" }
"description": "Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation.",
"experimental": true
},
{
"name": "getLayoutMetrics",
"description": "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.",
"experimental": true,
"returns": [
{ "name": "layoutViewport", "$ref": "LayoutViewport", "description": "Metrics relating to the layout viewport." },
{ "name": "visualViewport", "$ref": "VisualViewport", "description": "Metrics relating to the visual viewport." },
{ "name": "contentSize", "$ref": "DOM.Rect", "description": "Size of scrollable area."}
]
},
{
"name": "createIsolatedWorld",
"description": "Creates an isolated world for the given frame.",
"experimental": true,
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame in which the isolated world should be created." },
{ "name": "worldName", "type": "string", "optional": true, "description": "An optional name which is reported in the Execution Context." },
{ "name": "grantUniveralAccess", "type": "boolean", "optional": true, "description": "Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution." }
]
}
],
"events": [
{
"name": "domContentEventFired",
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "loadEventFired",
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "frameAttached",
"description": "Fired when frame has been attached to its parent.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." },
{ "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." },
{ "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace of when frame was attached, only set if frame initiated from script.", "experimental": true }
]
},
{
"name": "frameNavigated",
"description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
"parameters": [
{ "name": "frame", "$ref": "Frame", "description": "Frame object." }
]
},
{
"name": "frameDetached",
"description": "Fired when frame has been detached from its parent.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." }
]
},
{
"name": "frameStartedLoading",
"description": "Fired when frame has started loading.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." }
],
},
{
"name": "frameStoppedLoading",
"description": "Fired when frame has stopped loading.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." }
],
},
{
"name": "frameScheduledNavigation",
"description": "Fired when frame schedules a potential navigation.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." },
{ "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
],
},
{
"name": "frameClearedScheduledNavigation",
"description": "Fired when frame no longer has a scheduled navigation.",
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
],
},
{
"name": "frameResized",
},
{
"name": "javascriptDialogOpening",
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.",
"parameters": [
{ "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." },
{ "name": "type", "$ref": "DialogType", "description": "Dialog type." }
]
},
{
"name": "javascriptDialogClosed",
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
"parameters": [
{ "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." }
]
},
{
"name": "screencastFrame",
"description": "Compressed image data requested by the <code>startScreencast</code>.",
"parameters": [
{ "name": "data", "type": "string", "description": "Base64-encoded compressed image." },
{ "name": "metadata", "$ref": "ScreencastFrameMetadata", "description": "Screencast frame metadata."},
{ "name": "sessionId", "type": "integer", "description": "Frame number."}
},
{
"name": "screencastVisibilityChanged",
"description": "Fired when the page with currently enabled screencast was shown or hidden </code>.",
"parameters": [
{ "name": "visible", "type": "boolean", "description": "True if the page is visible." }
],
},
{
"name": "interstitialShown",
"description": "Fired when interstitial page was shown"
},
{
"name": "interstitialHidden",
"description": "Fired when interstitial page was hidden"
},
{
"name": "navigationRequested",
"description": "Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.",
"parameters": [
{ "name": "isInMainFrame", "type": "boolean", "description": "Whether the navigation is taking place in the main frame or in a subframe." },
{ "name": "isRedirect", "type": "boolean", "description": "Whether the navigation has encountered a server redirect or not." },
{ "name": "navigationId", "type": "integer" },
{ "name": "url", "type": "string", "description": "URL of requested navigation." }
]
}
]
},
{
"domain": "Overlay",
"description": "This domain provides various functionality related to drawing atop the inspected page.",
"dependencies": ["DOM", "Page", "Runtime"],
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
"types": [
{
"id": "HighlightConfig",
"type": "object",
"properties": [
{ "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." },
{ "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." },
{ "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." },
{ "name": "displayAsMaterial", "type": "boolean", "optional": true},
{ "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
{ "name": "paddingColor", "$ref": "DOM.RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." },
{ "name": "borderColor", "$ref": "DOM.RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." },
{ "name": "marginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." },
{ "name": "eventTargetColor", "$ref": "DOM.RGBA", "optional": true, "description": "The event target element highlight fill color (default: transparent)." },
{ "name": "shapeColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape outside fill color (default: transparent)." },
{ "name": "shapeMarginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape margin fill color (default: transparent)." },
{ "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."}
],
"description": "Configuration data for the highlighting of page elements."
},
{
"id": "InspectMode",
"type": "string",
"enum": [
"searchForNode",
"searchForUAShadowDOM",
"none"
]
}
],
"commands": [
{
"name": "enable",
"description": "Enables domain notifications."
},
{
"name": "disable",
"description": "Disables domain notifications."
},
{
"name": "setShowPaintRects",
"description": "Requests that backend shows paint rectangles",
"parameters": [
{ "name": "result", "type": "boolean", "description": "True for showing paint rectangles" }
]
},
{
"name": "setShowDebugBorders",
"description": "Requests that backend shows debug borders on layers",
"parameters": [
{ "name": "show", "type": "boolean", "description": "True for showing debug borders" }
]
},
{
"name": "setShowFPSCounter",
"description": "Requests that backend shows the FPS counter",
"parameters": [
{ "name": "show", "type": "boolean", "description": "True for showing the FPS counter" }
]
},
{
"name": "setShowScrollBottleneckRects",
"description": "Requests that backend shows scroll bottleneck rects",
"parameters": [
{ "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" }
]
},
{
"name": "setShowViewportSizeOnResize",
"description": "Paints viewport size upon main frame resize.",
"parameters": [
{ "name": "show", "type": "boolean", "description": "Whether to paint size or not." }
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
},
{
"name": "setPausedInDebuggerMessage",
"parameters": [
{ "name": "message", "type": "string", "optional": true, "description": "The message to display, also triggers resume and step over controls." }
]
},
{
"name": "setSuspended",
"parameters": [
{ "name": "suspended", "type": "boolean", "description": "Whether overlay should be suspended and not consume any resources until resumed." }
]
},
{
"name": "setInspectMode",
"description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.",
"parameters": [
{ "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." },
{ "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." }
]
},
{
"name": "highlightRect",
"description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.",
"parameters": [
{ "name": "x", "type": "integer", "description": "X coordinate" },
{ "name": "y", "type": "integer", "description": "Y coordinate" },
{ "name": "width", "type": "integer", "description": "Rectangle width" },
{ "name": "height", "type": "integer", "description": "Rectangle height" },
{ "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
{ "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
]
},
{
"name": "highlightQuad",
"description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.",
"parameters": [
{ "name": "quad", "$ref": "DOM.Quad", "description": "Quad to highlight" },
{ "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
{ "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
]
},
{
"name": "highlightNode",
"description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.",
"parameters": [
{ "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." },
{ "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "Identifier of the node to highlight." },
{ "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." },
{ "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted." }
]
},
{
"name": "highlightFrame",
"description": "Highlights owner element of the frame with given id.",
"parameters": [
{ "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." },
{ "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
{ "name": "contentOutlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." }
]
},
{
"name": "hideHighlight",
"description": "Hides any highlight."
},
{
"name": "getHighlightObjectForTest",
"description": "For testing.",
"parameters": [
{ "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get highlight object for." }
],
"returns": [
{ "name": "highlight", "type": "object", "description": "Highlight data for the node." }
]
}
],
"events": [
{
"name": "nodeHighlightRequested",
"description": "Fired when the node should be highlighted. This happens after call to <code>setInspectMode</code>.",
"parameters": [
{ "name": "nodeId", "$ref": "DOM.NodeId" }
]
},
{
"name": "inspectNodeRequested",
"description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspects an element.",
"parameters": [
{ "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "Id of the node to inspect." }
]
}
]
},
{
"domain": "Emulation",
"description": "This domain emulates different environments for the page.",
"types": [
{
"type": "object",
"properties": [
{ "name": "type", "type": "string", "enum": ["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"], "description": "Orientation type." },
{ "name": "angle", "type": "integer", "description": "Orientation angle." }
},
{
"id": "VirtualTimePolicy",
"type": "string",
"enum": [
"advance",
"pause",
"pauseIfNetworkFetchesPending"
],
"experimental": true,
"description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches."
}
],
"commands": [
{
"name": "setDeviceMetricsOverride",
"description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
"parameters": [
{ "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
{ "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
{ "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." },
{ "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
{ "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
{ "name": "scale", "type": "number", "optional": true, "experimental": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
{ "name": "offsetX", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." },
{ "name": "offsetY", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." },
{ "name": "screenWidth", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenHeight", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionX", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionY", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." }
]
},
{
"name": "clearDeviceMetricsOverride",
"description": "Clears the overriden device metrics."
},
{
"name": "forceViewport",
"description": "Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.",
"experimental": true,
"parameters": [
{ "name": "x", "type": "number", "description": "X coordinate of top-left corner of the area (CSS pixels)." },
{ "name": "y", "type": "number", "description": "Y coordinate of top-left corner of the area (CSS pixels)." },
{ "name": "scale", "type": "number", "description": "Scale to apply to the area (relative to a page scale of 1.0)." }
]
},
{
"name": "resetViewport",
"description": "Resets the visible area of the page to the original viewport, undoing any effects of the <code>forceViewport</code> command.",
"experimental": true
"name": "resetPageScaleFactor",
"experimental": true,
"description": "Requests that page scale factor is reset to initial values."
},
{
"name": "setPageScaleFactor",
"description": "Sets a specified page scale factor.",
"parameters": [
{ "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }
]
},
{
"name": "setVisibleSize",
"description": "Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.",
"experimental": true,
"parameters": [
{ "name": "width", "type": "integer", "description": "Frame width (DIP)." },
{ "name": "height", "type": "integer", "description": "Frame height (DIP)." }
]
},
{
"name": "setScriptExecutionDisabled",
"description": "Switches script execution in the page.",
"parameters": [
{ "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
]
},
{
"name": "setGeolocationOverride",
"description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
"parameters": [
{ "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
{ "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
{ "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
},
{
"name": "clearGeolocationOverride",
"description": "Clears the overriden Geolocation Position and Error.",
},
{
"name": "setTouchEmulationEnabled",
"parameters": [
{ "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." },
{ "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." }
],
"description": "Toggles mouse event-based touch event emulation."
},
{
"name": "setEmulatedMedia",
"parameters": [
{ "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
],
"description": "Emulates the given media for CSS media queries."
},
{
"name": "setCPUThrottlingRate",
"parameters": [
{ "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." }
],
"experimental": true,
"description": "Enables CPU throttling to emulate slow CPUs."
},
{
"name": "canEmulate",
"description": "Tells whether emulation is supported.",
"returns": [
{ "name": "result", "type": "boolean", "description": "True if emulation is supported." }
],
"experimental": true
},
{
"name": "setVirtualTimePolicy",
"description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.",
"parameters": [
{ "name": "policy", "$ref": "VirtualTimePolicy" },
{ "name": "budget", "type": "integer", "optional": true, "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent." }
],
"experimental": true
},
{
"name": "setDefaultBackgroundColorOverride",
"description": "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.",
"parameters": [
{ "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared." }
],
"experimental": true