{ | |
"version": { "major": "1", "minor": "3" }, | |
"domains": [{ | |
"domain": "Inspector", | |
"experimental": true, | |
"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": "prepareForLeakDetection" | |
}, | |
{ | |
"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": "Performance", | |
"types": [ | |
{ | |
"id": "Metric", | |
"type": "object", | |
"properties": [ | |
{ "name": "name", "type": "string", "description": "Metric name." }, | |
{ "name": "value", "type": "number", "description": "Metric value." } | |
], | |
"description": "Run-time execution metric." | |
} | |
], | |
"commands": [ | |
{ | |
"name": "enable", | |
"description": "Enable collecting and reporting metrics." | |
}, | |
{ | |
"name": "disable", | |
"description": "Disable collecting and reporting metrics." | |
}, | |
{ | |
"name": "getMetrics", | |
"returns": [ | |
{ "name": "metrics", "type": "array", "items": { "$ref": "Metric" }, "description": "Current values for run-time metrics." } | |
], | |
"description": "Retrieve current values of run-time metrics." | |
} | |
], | |
"events": [ | |
{ | |
"name": "metrics", | |
"description": "Current values of the metrics.", | |
"parameters": [ | |
{ "name": "metrics", "type": "array", "items": { "$ref": "Metric" }, "description": "Current values of the metrics." }, | |
{ "name": "title", "type": "string", "description": "Timestamp title." } | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "Page", | |
"description": "Actions and events related to the inspected page belong to the page domain.", | |
"dependencies": ["Debugger", "DOM", "Network"], | |
"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." }, | |
{ "name": "unreachableUrl", "type": "string", "optional": true, "experimental": true, "description": "If the frame failed to load, this contains the URL that could not be loaded." } | |
] | |
}, | |
{ | |
"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.TimeSinceEpoch", "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": "FrameTree", | |
"type": "object", | |
"description": "Information about the Frame hierarchy.", | |
"properties": [ | |
{ "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, | |
{ "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameTree" }, "description": "Child frames." } | |
] | |
}, | |
{ | |
"id": "ScriptIdentifier", | |
"type": "string", | |
"description": "Unique script identifier." | |
}, | |
{ | |
"id": "TransitionType", | |
"type": "string", | |
"description": "Transition type.", | |
"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", | |
"description": "Screencast frame metadata.", | |
"properties": [ | |
{ "name": "offsetTop", "type": "number", "description": "Top offset in DIP." }, | |
{ "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }, | |
{ "name": "deviceWidth", "type": "number", "description": "Device screen width in DIP." }, | |
{ "name": "deviceHeight", "type": "number", "description": "Device screen height in DIP." }, | |
{ "name": "scrollOffsetX", "type": "number", "description": "Position of horizontal scroll in CSS pixels." }, | |
{ "name": "scrollOffsetY", "type": "number", "description": "Position of vertical scroll in CSS pixels." }, | |
{ "name": "timestamp", "$ref": "Network.TimeSinceEpoch", "optional": true, "description": "Frame swap timestamp." } | |
], | |
"experimental": true | |
}, | |
{ | |
"id": "DialogType", | |
"description": "Javascript dialog type.", | |
"type": "string", | |
"enum": ["alert", "confirm", "prompt", "beforeunload"] | |
}, | |
{ | |
"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." } | |
] | |
}, | |
{ | |
"id": "LayoutViewport", | |
"type": "object", | |
"description": "Layout viewport position and dimensions.", | |
"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.", | |
"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)." } | |
] | |
}, | |
{ | |
"id": "Viewport", | |
"type": "object", | |
"description": "Viewport for capturing screenshot.", | |
"properties": [ | |
{ "name": "x", "type": "number", "description": "X offset in CSS pixels." }, | |
{ "name": "y", "type": "number", "description": "Y offset in CSS pixels" }, | |
{ "name": "width", "type": "number", "description": "Rectangle width in CSS pixels" }, | |
{ "name": "height", "type": "number", "description": "Rectangle height in CSS pixels" }, | |
{ "name": "scale", "type": "number", "description": "Page scale factor." } | |
] | |
} | |
], | |
"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." } | |
], | |
"deprecated": true, | |
"description": "Deprecated, please use addScriptToEvaluateOnNewDocument instead.", | |
"experimental": true | |
}, | |
{ | |
"name": "removeScriptToEvaluateOnLoad", | |
"parameters": [ | |
{ "name": "identifier", "$ref": "ScriptIdentifier" } | |
], | |
"deprecated": true, | |
"description": "Deprecated, please use removeScriptToEvaluateOnNewDocument instead.", | |
"experimental": true | |
}, | |
{ | |
"name": "addScriptToEvaluateOnNewDocument", | |
"parameters": [ | |
{ "name": "source", "type": "string" } | |
], | |
"returns": [ | |
{ "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." } | |
], | |
"description": "Evaluates given script in every frame upon creation (before loading frame's scripts)." | |
}, | |
{ | |
"name": "removeScriptToEvaluateOnNewDocument", | |
"parameters": [ | |
{ "name": "identifier", "$ref": "ScriptIdentifier" } | |
], | |
"description": "Removes given script from the list." | |
}, | |
{ | |
"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": "setLifecycleEventsEnabled", | |
"parameters": [ | |
{ "name": "enabled", "type": "boolean", "description": "If true, starts emitting lifecycle events." } | |
], | |
"description": "Controls whether page will emit lifecycle events.", | |
"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": "setAdBlockingEnabled", | |
"description": "Enable Chrome's experimental ad filter on all sites.", | |
"parameters": [ | |
{ "name": "enabled", "type": "boolean", "description": "Whether to block ads." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "navigate", | |
"parameters": [ | |
{ "name": "url", "type": "string", "description": "URL to navigate the page to." }, | |
{ "name": "referrer", "type": "string", "optional": true, "description": "Referrer URL." }, | |
{ "name": "transitionType", "$ref": "TransitionType", "optional": true, "description": "Intended transition type." } | |
], | |
"returns": [ | |
{ "name": "frameId", "$ref": "FrameId", "description": "Frame id that has navigated (or failed to navigate)" }, | |
{ "name": "loaderId", "$ref": "Network.LoaderId", "optional": true, "description": "Loader identifier." }, | |
{ "name": "errorText", "type": "string", "optional": true, "description": "User friendly error message, present if and only if navigation has failed." } | |
], | |
"description": "Navigates current page to the given URL." | |
}, | |
{ | |
"name": "stopLoading", | |
"description": "Force the page stop all navigations and pending resource fetches." | |
}, | |
{ | |
"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.", | |
"deprecated": true, | |
"experimental": true, | |
"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.", | |
"deprecated": true, | |
"experimental": true, | |
"redirect": "Network" | |
}, | |
{ | |
"name": "getResourceTree", | |
"description": "Returns present frame / resource tree structure.", | |
"returns": [ | |
{ "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "getFrameTree", | |
"description": "Returns present frame tree structure.", | |
"returns": [ | |
{ "name": "frameTree", "$ref": "FrameTree", "description": "Present frame 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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image." }, | |
{ "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call." }, | |
{ "name": "screenOrientation", "$ref": "Emulation.ScreenOrientation", "optional": true, "description": "Screen orientation override." }, | |
{ "name": "viewport", "$ref": "Viewport", "optional": true, "description": "The viewport dimensions and scale. If not set, the override is cleared." } | |
], | |
"experimental": true, | |
"deprecated": true, | |
"redirect": "Emulation" | |
}, | |
{ | |
"name": "clearDeviceMetricsOverride", | |
"description": "Clears the overriden device metrics.", | |
"redirect": "Emulation", | |
"deprecated": true, | |
"experimental": true | |
}, | |
{ | |
"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"} | |
], | |
"redirect": "Emulation", | |
"deprecated": true | |
}, | |
{ | |
"name": "clearGeolocationOverride", | |
"description": "Clears the overriden Geolocation Position and Error.", | |
"redirect": "Emulation", | |
"deprecated": true | |
}, | |
{ | |
"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", | |
"deprecated": true, | |
"experimental": true | |
}, | |
{ | |
"name": "clearDeviceOrientationOverride", | |
"description": "Clears the overridden Device Orientation.", | |
"redirect": "DeviceOrientation", | |
"deprecated": true, | |
"experimental": true | |
}, | |
{ | |
"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, | |
"deprecated": 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": "clip", "$ref": "Viewport", "optional": true, "description": "Capture the screenshot of a given region 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." } | |
] | |
}, | |
{ | |
"name": "printToPDF", | |
"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."}, | |
{"name": "ignoreInvalidPageRanges", "type": "boolean", "optional": true, "description": "Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false."} | |
], | |
"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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "stopScreencast", | |
"description": "Stops sending each frame in the <code>screencastFrame</code>.", | |
"experimental": true | |
}, | |
{ | |
"name": "screencastFrameAck", | |
"description": "Acknowledges that a screencast frame has been received by the frontend.", | |
"parameters": [ | |
{ "name": "sessionId", "type": "integer", "description": "Frame number." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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", | |
"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": "getLayoutMetrics", | |
"description": "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.", | |
"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.", | |
"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." } | |
], | |
"returns": [ | |
{ "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Execution context of the isolated world." } | |
] | |
}, | |
{ | |
"name": "bringToFront", | |
"description": "Brings page to front (activates tab)." | |
}, | |
{ | |
"name": "setDownloadBehavior", | |
"description": "Set the behavior when downloading a file.", | |
"experimental": true, | |
"parameters": [ | |
{ "name": "behavior", "type": "string", "enum": ["deny", "allow", "default"], "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny)." }, | |
{ "name": "downloadPath", "type": "string", "optional": true, "description": "The default path to save downloaded files to. This is requred if behavior is set to 'allow'" } | |
] | |
} | |
], | |
"events": [ | |
{ | |
"name": "domContentEventFired", | |
"parameters": [ | |
{ "name": "timestamp", "$ref": "Network.MonotonicTime" } | |
] | |
}, | |
{ | |
"name": "loadEventFired", | |
"parameters": [ | |
{ "name": "timestamp", "$ref": "Network.MonotonicTime" } | |
] | |
}, | |
{ | |
"name": "lifecycleEvent", | |
"parameters": [ | |
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame." }, | |
{ "name": "loaderId", "$ref": "Network.LoaderId", "description": "Loader identifier. Empty string if the request is fetched from worker." }, | |
{ "name": "name", "type": "string" }, | |
{ "name": "timestamp", "$ref": "Network.MonotonicTime" } | |
], | |
"description": "Fired for top level page lifecycle events such as navigation, load, paint, etc." | |
}, | |
{ | |
"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." } | |
] | |
}, | |
{ | |
"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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "frameStoppedLoading", | |
"description": "Fired when frame has stopped loading.", | |
"parameters": [ | |
{ "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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": "reason", "type": "string", "enum": ["formSubmissionGet", "formSubmissionPost", "httpHeaderRefresh", "scriptInitiated", "metaTagRefresh", "pageBlockInterstitial", "reload"], "description": "The reason for the navigation." }, | |
{ "name": "url", "type": "string", "description": "The destination URL for the scheduled navigation." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "frameResized", | |
"experimental": true | |
}, | |
{ | |
"name": "javascriptDialogOpening", | |
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.", | |
"parameters": [ | |
{ "name": "url", "type": "string", "description": "Frame url." }, | |
{ "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }, | |
{ "name": "type", "$ref": "DialogType", "description": "Dialog type." }, | |
{ "name": "defaultPrompt", "optional": true, "type": "string", "description": "Default dialog prompt." } | |
] | |
}, | |
{ | |
"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": "userInput", "type": "string", "description": "User input in case of prompt." } | |
] | |
}, | |
{ | |
"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."} | |
], | |
"experimental": true | |
}, | |
{ | |
"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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "interstitialShown", | |
"description": "Fired when interstitial page was shown" | |
}, | |
{ | |
"name": "interstitialHidden", | |
"description": "Fired when interstitial page was hidden" | |
}, | |
{ | |
"name": "windowOpen", | |
"description": "Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.", | |
"parameters": [ | |
{ "name": "url", "type": "string", "description": "The URL for the new window." }, | |
{ "name": "windowName", "type": "string", "description": "Window name."}, | |
{ "name": "windowFeatures", "type": "array", "items": { "type": "string" }, "description": "An array of enabled window features."}, | |
{ "name": "userGesture", "type": "boolean", "description": "Whether or not it was triggered by user gesture."} | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "Overlay", | |
"description": "This domain provides various functionality related to drawing atop the inspected page.", | |
"dependencies": ["DOM", "Page", "Runtime"], | |
"experimental": true, | |
"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."}, | |
{ "name": "cssGridColor", "$ref": "DOM.RGBA", "optional": true, "description": "The grid layout color (default: transparent)." } | |
], | |
"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." } | |
] | |
}, | |
{ | |
"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." } | |
] | |
}, | |
{ | |
"name": "screenshotRequested", | |
"description": "Fired when user asks to capture screenshot of some area on the page.", | |
"parameters": [ | |
{ "name": "viewport", "$ref": "Page.Viewport", "description": "Viewport to capture, in CSS." } | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "Emulation", | |
"description": "This domain emulates different environments for the page.", | |
"dependencies": ["DOM", "Page", "Runtime"], | |
"types": [ | |
{ | |
"id": "ScreenOrientation", | |
"type": "object", | |
"description": "Screen orientation.", | |
"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": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "experimental": true }, | |
{ "name": "screenWidth", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "screenHeight", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "positionX", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "positionY", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000)." }, | |
{ "name": "dontSetVisibleSize", "type": "boolean", "optional": true, "experimental": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call." }, | |
{ "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." }, | |
{ "name": "viewport", "$ref": "Page.Viewport", "optional": true, "experimental": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions." } | |
] | |
}, | |
{ | |
"name": "clearDeviceMetricsOverride", | |
"description": "Clears the overriden device metrics." | |
}, | |
{ | |
"name": "resetPageScaleFactor", | |
"experimental": true, | |
"description": "Requests that page scale factor is reset to initial values." | |
}, | |
{ | |
"name": "setPageScaleFactor", | |
"description": "Sets a specified page scale factor.", | |
"experimental": true, | |
"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, | |
"deprecated": 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": "maxTouchPoints", "type": "integer", "optional": true, "description": "Maximum touch points supported. Defaults to one." } | |
], | |
"description": "Enables touch on platforms which do not support them." | |
}, | |
{ | |
"name": "setEmitTouchEventsForMouse", | |
"parameters": [ | |
{ "name": "enabled", "type": "boolean", "description": "Whether touch emulation based on mouse input should be enabled." }, | |
{ "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } | |
], | |
"experimental": true | |
}, | |
{ | |
"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." } | |
] | |
}, | |
{ | |
"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": "number", "optional": true, "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent." }, | |
{ "name": "maxVirtualTimeTaskStarvationCount", "type": "integer", "optional": true, "description": "If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock." } | |
], | |
"returns": [ | |
{ "name": "virtualTimeBase", "$ref": "Runtime.Timestamp", "description": "Absolute timestamp at which virtual time was first enabled (milliseconds since epoch)." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "setNavigatorOverrides", | |
"description": "Overrides value returned by the javascript navigator object.", | |
"parameters": [ | |
{ "name": "platform", "type": "string", "description": "The platform navigator.platform should return." } | |
], | |
"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." } | |
] | |
} | |
], | |
"events": [ | |
{ | |
"name": "virtualTimeBudgetExpired", | |
"experimental": true, | |
"description": "Notification sent after the virtual time budget for the current VirtualTimePolicy has run out." | |
}, | |
{ | |
"name": "virtualTimeAdvanced", | |
"experimental": true, | |
"parameters": [ | |
{ "name": "virtualTimeElapsed", "type": "number", "description": "The amount of virtual time that has elapsed in milliseconds since virtual time was first enabled." } | |
], | |
"description": "Notification sent after the virtual time has advanced." | |
}, | |
{ | |
"name": "virtualTimePaused", | |
"experimental": true, | |
"parameters": [ | |
{ "name": "virtualTimeElapsed", "type": "number", "description": "The amount of virtual time that has elapsed in milliseconds since virtual time was first enabled." } | |
], | |
"description": "Notification sent after the virtual time has paused." | |
} | |
] | |
}, | |
{ | |
"domain": "Security", | |
"description": "Security", | |
"types": [ | |
{ | |
"id": "CertificateId", | |
"type": "integer", | |
"description": "An internal certificate ID value." | |
}, | |
{ | |
"id": "MixedContentType", | |
"type": "string", | |
"enum": ["blockable", "optionally-blockable", "none"], | |
"description": "A description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories" | |
}, | |
{ | |
"id": "SecurityState", | |
"type": "string", | |
"enum": ["unknown", "neutral", "insecure", "secure", "info"], | |
"description": "The security level of a page or resource." | |
}, | |
{ | |
"id": "SecurityStateExplanation", | |
"type": "object", | |
"properties": [ | |
{ "name": "securityState", "$ref": "SecurityState", "description": "Security state representing the severity of the factor being explained." }, | |
{ "name": "summary", "type": "string", "description": "Short phrase describing the type of factor." }, | |
{ "name": "description", "type": "string", "description": "Full text explanation of the factor." }, | |
{ "name": "mixedContentType", "$ref": "MixedContentType", "description": "The type of mixed content described by the explanation." }, | |
{ "name": "certificate", "type": "array", "items": { "type": "string" }, "description": "Page certificate." } | |
], | |
"description": "An explanation of an factor contributing to the security state." | |
}, | |
{ | |
"id": "InsecureContentStatus", | |
"type": "object", | |
"properties": [ | |
{ "name": "ranMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts." }, | |
{ "name": "displayedMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images." }, | |
{ "name": "containedMixedForm", "type": "boolean", "description": "True if the page was loaded over HTTPS and contained a form targeting an insecure url." }, | |
{ "name": "ranContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors." }, | |
{ "name": "displayedContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors." }, | |
{ "name": "ranInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that ran insecure content." }, | |
{ "name": "displayedInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that displayed insecure content." } | |
], | |
"description": "Information about insecure content on the page." | |
}, | |
{ | |
"id": "CertificateErrorAction", | |
"type": "string", | |
"enum": ["continue", "cancel"], | |
"description": "The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request." | |
} | |
], | |
"commands": [ | |
{ | |
"name": "enable", | |
"description": "Enables tracking security state changes." | |
}, | |
{ | |
"name": "disable", | |
"description": "Disables tracking security state changes." | |
}, | |
{ | |
"name": "handleCertificateError", | |
"description": "Handles a certificate error that fired a certificateError event.", | |
"parameters": [ | |
{ "name": "eventId", "type": "integer", "description": "The ID of the event."}, | |
{ "name": "action", "$ref": "CertificateErrorAction", "description": "The action to take on the certificate error." } | |
] | |
}, | |
{ | |
"name": "setOverrideCertificateErrors", | |
"description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.", | |
"parameters": [ | |
{ "name": "override", "type": "boolean", "description": "If true, certificate errors will be overridden."} | |
] | |
} | |
], | |
"events": [ | |
{ | |
"name": "securityStateChanged", | |
"description": "The security state of the page changed.", | |
"parameters": [ | |
{ "name": "securityState", "$ref": "SecurityState", "description": "Security state." }, | |
{ "name": "schemeIsCryptographic", "type": "boolean", "description": "True if the page was loaded over cryptographic transport such as HTTPS." }, | |
{ "name": "explanations", "type": "array", "items": { "$ref": "SecurityStateExplanation" }, "description": "List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included." }, | |
{ "name": "insecureContentStatus", "$ref": "InsecureContentStatus", "description": "Information about insecure content on the page." }, | |
{ "name": "summary", "type": "string", "description": "Overrides user-visible description of the state.", "optional": true } | |
] | |
}, | |
{ | |
"name": "certificateError", | |
"description": "There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally.", | |
"parameters": [ | |
{ "name": "eventId", "type": "integer", "description": "The ID of the event."}, | |
{ "name": "errorType", "type": "string", "description": "The type of the error."}, | |
{ "name": "requestURL", "type": "string", "description": "The url that was requested."} | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "Audits", | |
"description": "Audits domain allows investigation of page violations and possible improvements.", | |
"dependencies": ["Network"], | |
"experimental": true, | |
"commands": [ | |
{ | |
"name": "getEncodedResponse", | |
"description": "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "Network.RequestId", "description": "Identifier of the network request to get content for." }, | |
{ "name": "encoding", "type": "string", "enum": ["webp", "jpeg", "png"], "description": "The encoding to use." }, | |
{ "name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)" }, | |
{ "name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false)." } | |
], | |
"returns": [ | |
{ "name": "body", "type": "string", "optional": true, "description": "The encoded body as a base64 string. Omitted if sizeOnly is true." }, | |
{ "name": "originalSize", "type": "integer", "description": "Size before re-encoding." }, | |
{ "name": "encodedSize", "type": "integer", "description": "Size after re-encoding." } | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "Network", | |
"description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.", | |
"dependencies": ["Debugger", "Runtime", "Security"], | |
"types": [ | |
{ | |
"id": "LoaderId", | |
"type": "string", | |
"description": "Unique loader identifier." | |
}, | |
{ | |
"id": "RequestId", | |
"type": "string", | |
"description": "Unique request identifier." | |
}, | |
{ | |
"id": "InterceptionId", | |
"type": "string", | |
"description": "Unique intercepted request identifier." | |
}, | |
{ | |
"id": "ErrorReason", | |
"type": "string", | |
"enum": ["Failed", "Aborted", "TimedOut", "AccessDenied", "ConnectionClosed", "ConnectionReset", "ConnectionRefused", "ConnectionAborted", "ConnectionFailed", "NameNotResolved", "InternetDisconnected", "AddressUnreachable"], | |
"description": "Network level fetch failure reason." | |
}, | |
{ | |
"id": "TimeSinceEpoch", | |
"type": "number", | |
"description": "UTC time in seconds, counted from January 1, 1970." | |
}, | |
{ | |
"id": "MonotonicTime", | |
"type": "number", | |
"description": "Monotonically increasing time in seconds since an arbitrary point in the past." | |
}, | |
{ | |
"id": "Headers", | |
"type": "object", | |
"description": "Request / response headers as keys / values of JSON object." | |
}, | |
{ | |
"id": "ConnectionType", | |
"type": "string", | |
"enum": ["none", "cellular2g", "cellular3g", "cellular4g", "bluetooth", "ethernet", "wifi", "wimax", "other"], | |
"description": "The underlying connection technology that the browser is supposedly using." | |
}, | |
{ | |
"id": "CookieSameSite", | |
"type": "string", | |
"enum": ["Strict", "Lax"], | |
"description": "Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies" | |
}, | |
{ | |
"id": "ResourceTiming", | |
"type": "object", | |
"description": "Timing information for the request.", | |
"properties": [ | |
{ "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." }, | |
{ "name": "proxyStart", "type": "number", "description": "Started resolving proxy." }, | |
{ "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." }, | |
{ "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." }, | |
{ "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." }, | |
{ "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." }, | |
{ "name": "connectEnd", "type": "number", "description": "Connected to the remote host." }, | |
{ "name": "sslStart", "type": "number", "description": "Started SSL handshake." }, | |
{ "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." }, | |
{ "name": "workerStart", "type": "number", "description": "Started running ServiceWorker.", "experimental": true }, | |
{ "name": "workerReady", "type": "number", "description": "Finished Starting ServiceWorker.", "experimental": true }, | |
{ "name": "sendStart", "type": "number", "description": "Started sending request." }, | |
{ "name": "sendEnd", "type": "number", "description": "Finished sending request." }, | |
{ "name": "pushStart", "type": "number", "description": "Time the server started pushing request.", "experimental": true }, | |
{ "name": "pushEnd", "type": "number", "description": "Time the server finished pushing request.", "experimental": true }, | |
{ "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." } | |
] | |
}, | |
{ | |
"id": "ResourcePriority", | |
"type": "string", | |
"enum": ["VeryLow", "Low", "Medium", "High", "VeryHigh"], | |
"description": "Loading priority of a resource request." | |
}, | |
{ | |
"id": "Request", | |
"type": "object", | |
"description": "HTTP request data.", | |
"properties": [ | |
{ "name": "url", "type": "string", "description": "Request URL." }, | |
{ "name": "method", "type": "string", "description": "HTTP request method." }, | |
{ "name": "headers", "$ref": "Headers", "description": "HTTP request headers." }, | |
{ "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }, | |
{ "name": "mixedContentType", "$ref": "Security.MixedContentType", "optional": true, "description": "The mixed content type of the request." }, | |
{ "name": "initialPriority", "$ref": "ResourcePriority", "description": "Priority of the resource request at the time request is sent."}, | |
{ "name": "referrerPolicy", "type": "string", "enum": [ "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" }, | |
{ "name": "isLinkPreload", "type": "boolean", "optional": true, "description": "Whether is loaded via link preload." } | |
] | |
}, | |
{ | |
"id": "SignedCertificateTimestamp", | |
"type" : "object", | |
"description": "Details of a signed certificate timestamp (SCT).", | |
"properties": [ | |
{ "name": "status", "type": "string", "description": "Validation status." }, | |
{ "name": "origin", "type": "string", "description": "Origin." }, | |
{ "name": "logDescription", "type": "string", "description": "Log name / description." }, | |
{ "name": "logId", "type": "string", "description": "Log ID." }, | |
{ "name": "timestamp", "$ref": "TimeSinceEpoch", "description": "Issuance date." }, | |
{ "name": "hashAlgorithm", "type": "string", "description": "Hash algorithm." }, | |
{ "name": "signatureAlgorithm", "type": "string", "description": "Signature algorithm." }, | |
{ "name": "signatureData", "type": "string", "description": "Signature data." } | |
] | |
}, | |
{ | |
"id": "SecurityDetails", | |
"type": "object", | |
"description": "Security details about a request.", | |
"properties": [ | |
{ "name": "protocol", "type": "string", "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\")." }, | |
{ "name": "keyExchange", "type": "string", "description": "Key Exchange used by the connection, or the empty string if not applicable." }, | |
{ "name": "keyExchangeGroup", "type": "string", "optional": true, "description": "(EC)DH group used by the connection, if applicable." }, | |
{ "name": "cipher", "type": "string", "description": "Cipher name." }, | |
{ "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs." }, | |
{ "name": "certificateId", "$ref": "Security.CertificateId", "description": "Certificate ID value." }, | |
{ "name": "subjectName", "type": "string", "description": "Certificate subject name." }, | |
{ "name": "sanList", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) DNS names and IP addresses." }, | |
{ "name": "issuer", "type": "string", "description": "Name of the issuing CA." }, | |
{ "name": "validFrom", "$ref": "TimeSinceEpoch", "description": "Certificate valid from date." }, | |
{ "name": "validTo", "$ref": "TimeSinceEpoch", "description": "Certificate valid to (expiration) date" }, | |
{ "name": "signedCertificateTimestampList", "type": "array", "items": { "$ref": "SignedCertificateTimestamp" }, "description": "List of signed certificate timestamps (SCTs)." } | |
] | |
}, | |
{ | |
"id": "BlockedReason", | |
"type": "string", | |
"description": "The reason why request was blocked.", | |
"enum": ["csp", "mixed-content", "origin", "inspector", "subresource-filter", "other"] | |
}, | |
{ | |
"id": "Response", | |
"type": "object", | |
"description": "HTTP response data.", | |
"properties": [ | |
{ "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." }, | |
{ "name": "status", "type": "integer", "description": "HTTP response status code." }, | |
{ "name": "statusText", "type": "string", "description": "HTTP response status text." }, | |
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, | |
{ "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, | |
{ "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, | |
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." }, | |
{ "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." }, | |
{ "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." }, | |
{ "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." }, | |
{ "name": "remoteIPAddress", "type": "string", "optional": true, "description": "Remote IP address." }, | |
{ "name": "remotePort", "type": "integer", "optional": true, "description": "Remote port."}, | |
{ "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." }, | |
{ "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker." }, | |
{ "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far." }, | |
{ "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }, | |
{ "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request." }, | |
{ "name": "securityState", "$ref": "Security.SecurityState", "description": "Security state of the request resource." }, | |
{ "name": "securityDetails", "$ref": "SecurityDetails", "optional": true, "description": "Security details for the request." } | |
] | |
}, | |
{ | |
"id": "WebSocketRequest", | |
"type": "object", | |
"description": "WebSocket request data.", | |
"properties": [ | |
{ "name": "headers", "$ref": "Headers", "description": "HTTP request headers." } | |
] | |
}, | |
{ | |
"id": "WebSocketResponse", | |
"type": "object", | |
"description": "WebSocket response data.", | |
"properties": [ | |
{ "name": "status", "type": "integer", "description": "HTTP response status code." }, | |
{ "name": "statusText", "type": "string", "description": "HTTP response status text." }, | |
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, | |
{ "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, | |
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "HTTP request headers." }, | |
{ "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." } | |
] | |
}, | |
{ | |
"id": "WebSocketFrame", | |
"type": "object", | |
"description": "WebSocket frame data.", | |
"properties": [ | |
{ "name": "opcode", "type": "number", "description": "WebSocket frame opcode." }, | |
{ "name": "mask", "type": "boolean", "description": "WebSocke frame mask." }, | |
{ "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." } | |
] | |
}, | |
{ | |
"id": "CachedResource", | |
"type": "object", | |
"description": "Information about the cached resource.", | |
"properties": [ | |
{ "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." }, | |
{ "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." }, | |
{ "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." }, | |
{ "name": "bodySize", "type": "number", "description": "Cached response body size." } | |
] | |
}, | |
{ | |
"id": "Initiator", | |
"type": "object", | |
"description": "Information about the request initiator.", | |
"properties": [ | |
{ "name": "type", "type": "string", "enum": ["parser", "script", "preload", "other"], "description": "Type of this initiator." }, | |
{ "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." }, | |
{ "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type or for Script type (when script is importing module)." }, | |
{ "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based)." } | |
] | |
}, | |
{ | |
"id": "Cookie", | |
"type": "object", | |
"description": "Cookie object", | |
"properties": [ | |
{ "name": "name", "type": "string", "description": "Cookie name." }, | |
{ "name": "value", "type": "string", "description": "Cookie value." }, | |
{ "name": "domain", "type": "string", "description": "Cookie domain." }, | |
{ "name": "path", "type": "string", "description": "Cookie path." }, | |
{ "name": "expires", "type": "number", "description": "Cookie expiration date as the number of seconds since the UNIX epoch." }, | |
{ "name": "size", "type": "integer", "description": "Cookie size." }, | |
{ "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." }, | |
{ "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, | |
{ "name": "session", "type": "boolean", "description": "True in case of session cookie." }, | |
{ "name": "sameSite", "$ref": "CookieSameSite", "optional": true, "description": "Cookie SameSite type." } | |
] | |
}, | |
{ | |
"id": "CookieParam", | |
"type": "object", | |
"description": "Cookie parameter object", | |
"properties": [ | |
{ "name": "name", "type": "string", "description": "Cookie name." }, | |
{ "name": "value", "type": "string", "description": "Cookie value." }, | |
{ "name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie." }, | |
{ "name": "domain", "type": "string", "optional": true, "description": "Cookie domain." }, | |
{ "name": "path", "type": "string", "optional": true, "description": "Cookie path." }, | |
{ "name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure." }, | |
{ "name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only." }, | |
{ "name": "sameSite", "$ref": "CookieSameSite", "optional": true, "description": "Cookie SameSite type." }, | |
{ "name": "expires", "$ref": "TimeSinceEpoch", "optional": true, "description": "Cookie expiration date, session cookie if not set" } | |
] | |
}, | |
{ | |
"id": "AuthChallenge", | |
"type": "object", | |
"description": "Authorization challenge for HTTP status code 401 or 407.", | |
"properties": [ | |
{ "name": "source", "type": "string", "optional": true, "enum": ["Server", "Proxy"], "description": "Source of the authentication challenge." }, | |
{ "name": "origin", "type": "string", "description": "Origin of the challenger." }, | |
{ "name": "scheme", "type": "string", "description": "The authentication scheme used, such as basic or digest" }, | |
{ "name": "realm", "type": "string", "description": "The realm of the challenge. May be empty." } | |
], | |
"experimental": true | |
}, | |
{ | |
"id": "AuthChallengeResponse", | |
"type": "object", | |
"description": "Response to an AuthChallenge.", | |
"properties": [ | |
{ "name": "response", "type": "string", "enum": ["Default", "CancelAuth", "ProvideCredentials"], "description": "The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box." }, | |
{ "name": "username", "type": "string", "optional": true, "description": "The username to provide, possibly empty. Should only be set if response is ProvideCredentials." }, | |
{ "name": "password", "type": "string", "optional": true, "description": "The password to provide, possibly empty. Should only be set if response is ProvideCredentials." } | |
], | |
"experimental": true | |
}, | |
{ | |
"id": "InterceptionStage", | |
"type": "string", | |
"description": "Stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received.", | |
"enum": ["Request", "HeadersReceived"], | |
"experimental": true | |
}, | |
{ | |
"id": "RequestPattern", | |
"type": "object", | |
"description": "Request pattern for interception.", | |
"properties": [ | |
{ "name": "urlPattern", "type": "string", "optional": true, "description": "Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to \"*\"." }, | |
{ "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "If set, only requests for matching resource types will be intercepted." }, | |
{ "name": "interceptionStage", "$ref": "InterceptionStage" , "optional": true, "description": "Stage at wich to begin intercepting requests. Default is Request." } | |
], | |
"experimental": true | |
} | |
], | |
"commands": [ | |
{ | |
"name": "enable", | |
"description": "Enables network tracking, network events will now be delivered to the client.", | |
"parameters": [ | |
{ "name": "maxTotalBufferSize", "type": "integer", "optional": true, "experimental": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc)." }, | |
{ "name": "maxResourceBufferSize", "type": "integer", "optional": true, "experimental": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc)." } | |
] | |
}, | |
{ | |
"name": "disable", | |
"description": "Disables network tracking, prevents network events from being sent to the client." | |
}, | |
{ | |
"name": "setUserAgentOverride", | |
"description": "Allows overriding user agent with the given string.", | |
"parameters": [ | |
{ "name": "userAgent", "type": "string", "description": "User agent to use." } | |
] | |
}, | |
{ | |
"name": "searchInResponseBody", | |
"description": "Searches for given string in response content.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network response to search." }, | |
{ "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." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "setExtraHTTPHeaders", | |
"description": "Specifies whether to always send extra HTTP headers with the requests from this page.", | |
"parameters": [ | |
{ "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." } | |
] | |
}, | |
{ | |
"name": "getResponseBody", | |
"description": "Returns content served for the given request.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." } | |
], | |
"returns": [ | |
{ "name": "body", "type": "string", "description": "Response body." }, | |
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." } | |
] | |
}, | |
{ | |
"name": "setBlockedURLs", | |
"description": "Blocks URLs from loading.", | |
"parameters": [ | |
{ "name": "urls", "type": "array", "items": { "type": "string" }, "description": "URL patterns to block. Wildcards ('*') are allowed." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "replayXHR", | |
"description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "canClearBrowserCache", | |
"description": "Tells whether clearing browser cache is supported.", | |
"returns": [ | |
{ "name": "result", "type": "boolean", "description": "True if browser cache can be cleared." } | |
], | |
"deprecated": true | |
}, | |
{ | |
"name": "clearBrowserCache", | |
"description": "Clears browser cache." | |
}, | |
{ | |
"name": "canClearBrowserCookies", | |
"description": "Tells whether clearing browser cookies is supported.", | |
"returns": [ | |
{ "name": "result", "type": "boolean", "description": "True if browser cookies can be cleared." } | |
], | |
"deprecated": true | |
}, | |
{ | |
"name": "clearBrowserCookies", | |
"description": "Clears browser cookies." | |
}, | |
{ | |
"name": "getCookies", | |
"parameters": [ | |
{ "name": "urls", "type": "array", "items": { "type": "string" }, "optional": true, "description": "The list of URLs for which applicable cookies will be fetched" } | |
], | |
"returns": [ | |
{ "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." } | |
], | |
"description": "Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field." | |
}, | |
{ | |
"name": "getAllCookies", | |
"returns": [ | |
{ "name": "cookies", "type": "array", "items": { "$ref": "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." | |
}, | |
{ | |
"name": "deleteCookies", | |
"parameters": [ | |
{ "name": "name", "type": "string", "description": "Name of the cookies to remove." }, | |
{ "name": "url", "type": "string", "optional": true, "description": "If specified, deletes all the cookies with the given name where domain and path match provided URL." }, | |
{ "name": "domain", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact domain." }, | |
{ "name": "path", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact path." } | |
], | |
"description": "Deletes browser cookies with matching name and url or domain/path pair." | |
}, | |
{ | |
"name": "setCookie", | |
"parameters": [ | |
{ "name": "name", "type": "string", "description": "Cookie name." }, | |
{ "name": "value", "type": "string", "description": "Cookie value." }, | |
{ "name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie." }, | |
{ "name": "domain", "type": "string", "optional": true, "description": "Cookie domain." }, | |
{ "name": "path", "type": "string", "optional": true, "description": "Cookie path." }, | |
{ "name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure." }, | |
{ "name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only." }, | |
{ "name": "sameSite", "$ref": "CookieSameSite", "optional": true, "description": "Cookie SameSite type." }, | |
{ "name": "expires", "$ref": "TimeSinceEpoch", "optional": true, "description": "Cookie expiration date, session cookie if not set" } | |
], | |
"returns": [ | |
{ "name": "success", "type": "boolean", "description": "True if successfully set cookie." } | |
], | |
"description": "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist." | |
}, | |
{ | |
"name": "setCookies", | |
"parameters": [ | |
{ "name": "cookies", "type": "array", "items": { "$ref": "CookieParam" }, "description": "Cookies to be set." } | |
], | |
"description": "Sets given cookies." | |
}, | |
{ | |
"name": "canEmulateNetworkConditions", | |
"description": "Tells whether emulation of network conditions is supported.", | |
"returns": [ | |
{ "name": "result", "type": "boolean", "description": "True if emulation of network conditions is supported." } | |
], | |
"deprecated": true | |
}, | |
{ | |
"name": "emulateNetworkConditions", | |
"description": "Activates emulation of network conditions.", | |
"parameters": [ | |
{ "name": "offline", "type": "boolean", "description": "True to emulate internet disconnection." }, | |
{ "name": "latency", "type": "number", "description": "Minimum latency from request sent to response headers received (ms)." }, | |
{ "name": "downloadThroughput", "type": "number", "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling." }, | |
{ "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling." }, | |
{ "name": "connectionType", "$ref": "ConnectionType", "optional": true, "description": "Connection type if known."} | |
] | |
}, | |
{ | |
"name": "setCacheDisabled", | |
"parameters": [ | |
{ "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." } | |
], | |
"description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used." | |
}, | |
{ | |
"name": "setBypassServiceWorker", | |
"parameters": [ | |
{ "name": "bypass", "type": "boolean", "description": "Bypass service worker and load from network." } | |
], | |
"experimental": true, | |
"description": "Toggles ignoring of service worker for each request." | |
}, | |
{ | |
"name": "setDataSizeLimitsForTest", | |
"parameters": [ | |
{ "name": "maxTotalSize", "type": "integer", "description": "Maximum total buffer size." }, | |
{ "name": "maxResourceSize", "type": "integer", "description": "Maximum per-resource size." } | |
], | |
"description": "For testing.", | |
"experimental": true | |
}, | |
{ | |
"name": "getCertificate", | |
"description": "Returns the DER-encoded certificate.", | |
"parameters": [ | |
{ "name": "origin", "type": "string", "description": "Origin to get certificate for." } | |
], | |
"returns": [ | |
{ "name": "tableNames", "type": "array", "items": { "type": "string" } } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "setRequestInterception", | |
"description": "Sets the requests to intercept that match a the provided patterns and optionally resource types.", | |
"parameters": [ | |
{ "name": "patterns", "type": "array", "items": { "$ref": "RequestPattern" }, "description": "Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "continueInterceptedRequest", | |
"description": "Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId.", | |
"parameters": [ | |
{ "name": "interceptionId", "$ref": "InterceptionId" }, | |
{ "name": "errorReason", "$ref": "ErrorReason", "optional": true, "description": "If set this causes the request to fail with the given reason. Passing <code>Aborted</code> for requests marked with <code>isNavigationRequest</code> also cancels the navigation. Must not be set in response to an authChallenge." }, | |
{ "name": "rawResponse", "type": "string", "optional": true, "description": "If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge." }, | |
{ "name": "url", "type": "string", "optional": true, "description": "If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge." }, | |
{ "name": "method", "type": "string", "optional": true, "description": "If set this allows the request method to be overridden. Must not be set in response to an authChallenge."}, | |
{ "name": "postData", "type": "string", "optional": true, "description": "If set this allows postData to be set. Must not be set in response to an authChallenge."}, | |
{ "name": "headers", "$ref": "Headers", "optional": true, "description": "If set this allows the request headers to be changed. Must not be set in response to an authChallenge."}, | |
{ "name": "authChallengeResponse", "$ref": "AuthChallengeResponse", "optional": true, "description": "Response to a requestIntercepted with an authChallenge. Must not be set otherwise." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "getResponseBodyForInterception", | |
"description": "Returns content served for the given currently intercepted request.", | |
"parameters": [ | |
{ "name": "interceptionId", "$ref": "InterceptionId", "description": "Identifier for the intercepted request to get body for." } | |
], | |
"returns": [ | |
{ "name": "body", "type": "string", "description": "Response body." }, | |
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." } | |
], | |
"experimental": true | |
} | |
], | |
"events": [ | |
{ | |
"name": "resourceChangedPriority", | |
"description": "Fired when resource loading priority is changed", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "newPriority", "$ref": "ResourcePriority", "description": "New priority" }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." } | |
], | |
"experimental": true | |
}, | |
{ | |
"name": "requestWillBeSent", | |
"description": "Fired when page is about to send HTTP request.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier. Empty string if the request is fetched from worker." }, | |
{ "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." }, | |
{ "name": "request", "$ref": "Request", "description": "Request data." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "wallTime", "$ref": "TimeSinceEpoch", "description": "Timestamp." }, | |
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." }, | |
{ "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }, | |
{ "name": "type", "$ref": "Page.ResourceType", "optional": true, "description": "Type of this resource." }, | |
{ "name": "frameId", "optional": true, "$ref": "Page.FrameId", "description": "Frame identifier." } | |
] | |
}, | |
{ | |
"name": "requestServedFromCache", | |
"description": "Fired if request ended up loading from cache.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." } | |
] | |
}, | |
{ | |
"name": "responseReceived", | |
"description": "Fired when HTTP response is available.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier. Empty string if the request is fetched from worker." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, | |
{ "name": "response", "$ref": "Response", "description": "Response data." }, | |
{ "name": "frameId", "optional": true, "$ref": "Page.FrameId", "description": "Frame identifier." } | |
] | |
}, | |
{ | |
"name": "dataReceived", | |
"description": "Fired when data chunk was received over the network.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "dataLength", "type": "integer", "description": "Data chunk length." }, | |
{ "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." } | |
] | |
}, | |
{ | |
"name": "loadingFinished", | |
"description": "Fired when HTTP request has finished loading.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "encodedDataLength", "type": "number", "description": "Total number of bytes received for this request." } | |
] | |
}, | |
{ | |
"name": "loadingFailed", | |
"description": "Fired when HTTP request has failed to load.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, | |
{ "name": "errorText", "type": "string", "description": "User friendly error message." }, | |
{ "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }, | |
{ "name": "blockedReason", "$ref": "BlockedReason", "optional": true, "description": "The reason why loading was blocked, if any." } | |
] | |
}, | |
{ | |
"name": "webSocketWillSendHandshakeRequest", | |
"description": "Fired when WebSocket is about to initiate handshake.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "wallTime", "$ref": "TimeSinceEpoch", "description": "UTC Timestamp." }, | |
{ "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." } | |
] | |
}, | |
{ | |
"name": "webSocketHandshakeResponseReceived", | |
"description": "Fired when WebSocket handshake response becomes available.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." } | |
] | |
}, | |
{ | |
"name": "webSocketCreated", | |
"description": "Fired upon WebSocket creation.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "url", "type": "string", "description": "WebSocket request URL." }, | |
{ "name": "initiator", "$ref": "Initiator", "optional": true, "description": "Request initiator." } | |
] | |
}, | |
{ | |
"name": "webSocketClosed", | |
"description": "Fired when WebSocket is closed.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." } | |
] | |
}, | |
{ | |
"name": "webSocketFrameReceived", | |
"description": "Fired when WebSocket frame is received.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } | |
] | |
}, | |
{ | |
"name": "webSocketFrameError", | |
"description": "Fired when WebSocket frame error occurs.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." } | |
] | |
}, | |
{ | |
"name": "webSocketFrameSent", | |
"description": "Fired when WebSocket frame is sent.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } | |
] | |
}, | |
{ | |
"name": "eventSourceMessageReceived", | |
"description": "Fired when EventSource message is received.", | |
"parameters": [ | |
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, | |
{ "name": "timestamp", "$ref": "MonotonicTime", "description": "Timestamp." }, | |
{ "name": "eventName", "type": "string", "description": "Message type." }, | |
{ "name": "eventId", "type": "string", "description": "Message identifier." }, | |
{ "name": "data", "type": "string", "description": "Message content." } | |
] | |
}, | |
{ | |
"name": "requestIntercepted", | |
"description": "Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.", | |
"parameters": [ | |
{ "name": "interceptionId", "$ref": "InterceptionId", "description": "Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used." }, | |
{ "name": "request", "$ref": "Request" }, | |
{ "name": "frameId", "$ref": "Page.FrameId", "description": "The id of the frame that initiated the request." }, | |
{ "name": "resourceType", "$ref": "Page.ResourceType", "description": "How the requested resource will be used." }, | |
{ "name": "isNavigationRequest", "type": "boolean", "description": "Whether this is a navigation request, which can abort the navigation completely." }, | |
{ "name": "redirectUrl", "optional": true, "type": "string", "description": "Redirect location, only sent if a redirect was intercepted."}, | |
{ "name": "authChallenge", "$ref": "AuthChallenge", "optional": true, "description": "Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse." }, | |
{ "name": "responseErrorReason", "$ref": "ErrorReason", "optional": true, "description": "Response error if intercepted at response stage or if redirect occurred while intercepting request."}, | |
{ "name": "responseStatusCode", "type": "integer", "optional": true, "description": "Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred." }, | |
{ "name": "responseHeaders", "$ref": "Headers", "optional": true, "description": "Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred." } | |
], | |
"experimental": true | |
} | |
] | |
}, | |
{ | |
"domain": "Database", | |
"experimental": true, | |
"types": [ | |
{ | |
"id": "DatabaseId", | |
"type": "string", | |
"description": "Unique identifier of Database object." | |
}, | |
{ | |
"id": "Database", | |
"type": "object", | |
"description": "Database object.", | |
"properties": [ | |
{ "name": "id", "$ref": "DatabaseId", "description": "Database ID." }, | |
{ "name": "domain", "type": "string", "description": "Database domain." }, | |
{ "name": "name", "type": "string", "description": "Database name." }, | |
{ "name": "version", "type": "string", "description": "Database version." } | |
] | |
}, | |
{ | |
"id": "Error", | |
"type": "object", | |
"description": "Database error.", | |
"properties": [ | |
{ "name": "message", "type": "string", "description": "Error message." }, | |
{ "name": "code", "type": "integer", "description": "Error code." } | |
] | |
} | |
], | |
"commands": [ | |
{ | |
"name": "enable", | |
"description": "Enables database tracking, database events will now be delivered to the client." | |
}, | |
{ | |
"name": "disable", | |
"description": "Disables database tracking, prevents database events from being sent to the client." | |
}, | |
{ | |
"name": "getDatabaseTableNames", | |
"parameters": [ | |
{ "name": "databaseId", "$ref": "DatabaseId" } | |
], | |
"returns": [ | |
{ "name": "tableNames", "type": "array", "items": { "type": "string" } } | |
] | |
}, | |
{ | |
"name": "executeSQL", | |
"parameters": [ | |
{ "name": "databaseId", "$ref": "DatabaseId" }, | |
{ "name": "query", "type": "string" } | |
], | |
"returns": [ | |
{ "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } }, | |
{ "name": "values", "type": "array", "optional": true, "items": { "type": "any" }}, | |
{ "name": "sqlError", "$ref": "Error", "optional": true } | |
] | |
} | |
], | |
"events": [ | |
{ | |
"name": "addDatabase", | |
"parameters": [ | |
{ "name": "database", "$ref": "Database" } | |
] | |
} | |
] | |
}, | |
{ | |
"domain": "IndexedDB", | |
"dependencies": ["Runtime"], | |
"experimental": true, | |
"types": [ | |
{ | |
"id": "DatabaseWithObjectStores", | |
"type": "object", | |
"description": "Database with an array of object stores.", | |
"properties": [ | |
{ "name": "name", "type": "string", "description": "Database name." }, | |
{ "name": "version", "type": "integer", "description": "Database version." }, | |
{ "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." } | |
] | |
}, | |
{ | |
"id": "ObjectStore", | |
"type": "object", | |
"description": "Object store.", | |
"properties": [ | |
{ "name": "name", "type": "string", "description": "Object store name." }, | |
{ "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." }, | |
{ "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." }, | |