From f5e0f88eac0feabfa2f7067b83274fc73a65f53a Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Thu, 26 Jul 2012 08:12:45 +0200 Subject: [PATCH 01/20] Enabled the remaining agents --- src/LiveDevelopment/LiveDevelopment.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index cc09f07a61a..df5dc59d736 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -74,13 +74,11 @@ define(function LiveDevelopment(require, exports, module) { "remote": require("LiveDevelopment/Agents/RemoteAgent"), "network": require("LiveDevelopment/Agents/NetworkAgent"), "dom": require("LiveDevelopment/Agents/DOMAgent"), - "css": require("LiveDevelopment/Agents/CSSAgent") - /* FUTURE + "css": require("LiveDevelopment/Agents/CSSAgent"), "script": require("LiveDevelopment/Agents/ScriptAgent"), "highlight": require("LiveDevelopment/Agents/HighlightAgent"), "goto": require("LiveDevelopment/Agents/GotoAgent"), "edit": require("LiveDevelopment/Agents/EditAgent") - */ }; var _htmlDocumentPath; // the path of the html file open for live development From 45c7602cce2fdd382bb51b91fe3765462121bf87 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Thu, 26 Jul 2012 22:21:52 +0200 Subject: [PATCH 02/20] re-enabled live-development --- src/LiveDevelopment/Documents/CSSDocument.js | 20 +- src/LiveDevelopment/Documents/HTMLDocument.js | 8 +- src/LiveDevelopment/Documents/JSDocument.js | 8 +- src/LiveDevelopment/Inspector/Inspector.json | 408 +++++++++- src/LiveDevelopment/Inspector/inspector.html | 760 ++++++++++++++++-- src/LiveDevelopment/LiveDevelopment.js | 44 +- src/LiveDevelopment/main.js | 22 +- 7 files changed, 1129 insertions(+), 141 deletions(-) diff --git a/src/LiveDevelopment/Documents/CSSDocument.js b/src/LiveDevelopment/Documents/CSSDocument.js index 1f50a614c87..7839bc433c9 100644 --- a/src/LiveDevelopment/Documents/CSSDocument.js +++ b/src/LiveDevelopment/Documents/CSSDocument.js @@ -21,7 +21,6 @@ * */ - /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ @@ -58,7 +57,7 @@ define(function CSSDocumentModule(require, exports, module) { */ var CSSDocument = function CSSDocument(doc, editor, inspector) { this.doc = doc; - + // FUTURE: Highlighting is currently disabled, since this code doesn't yet know // how to deal with different editors pointing at the same document. /* @@ -68,7 +67,7 @@ define(function CSSDocumentModule(require, exports, module) { this.onCursorActivity = this.onCursorActivity.bind(this); Inspector.on("HighlightAgent.highlight", this.onHighlight); */ - + // Add a ref to the doc since we're listening for change events this.doc.addRef(); this.onChange = this.onChange.bind(this); @@ -89,7 +88,7 @@ define(function CSSDocumentModule(require, exports, module) { // res = {styleSheet} this.rules = res.styleSheet.rules; }.bind(this)); - + // If the CSS document is dirty, push the changes into the browser now if (doc.isDirty) { CSSAgent.reloadCSSForDocument(this.doc); @@ -99,7 +98,7 @@ define(function CSSDocumentModule(require, exports, module) { /** Get the browser version of the StyleSheet object */ CSSDocument.prototype.getStyleSheetFromBrowser = function getStyleSheetFromBrowser() { var deferred = new $.Deferred(); - + // WebInspector Command: CSS.getStyleSheet Inspector.CSS.getStyleSheet(this.styleSheet.styleSheetId, function callback(res) { // res = {styleSheet} @@ -109,20 +108,20 @@ define(function CSSDocumentModule(require, exports, module) { deferred.reject(); } }); - + return deferred.promise(); }; - + /** Get the browser version of the source */ CSSDocument.prototype.getSourceFromBrowser = function getSourceFromBrowser() { var deferred = new $.Deferred(); - + this.getStyleSheetFromBrowser().done(function onDone(styleSheet) { deferred.resolve(styleSheet.text); }).fail(function onFail() { deferred.reject(); }); - + return deferred.promise(); }; @@ -150,7 +149,6 @@ define(function CSSDocumentModule(require, exports, module) { return null; }; - /** Event Handlers *******************************************************/ /** Triggered on cursor activity of the editor */ @@ -176,7 +174,7 @@ define(function CSSDocumentModule(require, exports, module) { CSSDocument.prototype.onDeleted = function onDeleted(event, editor, change) { // clear the CSS CSSAgent.clearCSSForDocument(this.doc); - + // shut down, since our Document is now dead this.close(); $(this).triggerHandler("deleted", [this]); diff --git a/src/LiveDevelopment/Documents/HTMLDocument.js b/src/LiveDevelopment/Documents/HTMLDocument.js index 9b967502447..92b259987d9 100644 --- a/src/LiveDevelopment/Documents/HTMLDocument.js +++ b/src/LiveDevelopment/Documents/HTMLDocument.js @@ -21,7 +21,6 @@ * */ - /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ @@ -53,6 +52,9 @@ define(function HTMLDocumentModule(require, exports, module) { * @param Document the source document from Brackets */ var HTMLDocument = function HTMLDocument(doc, editor) { + if (!editor) { + return; + } this.doc = doc; this.editor = editor; this.onHighlight = this.onHighlight.bind(this); @@ -66,13 +68,15 @@ define(function HTMLDocumentModule(require, exports, module) { /** Close the document */ HTMLDocument.prototype.close = function close() { + if (!this.editor) { + return; + } Inspector.off("HighlightAgent.highlight", this.onHighlight); $(this.editor).off("change", this.onChange); $(this.editor).off("cursorActivity", this.onCursorActivity); this.onHighlight(); }; - /** Event Handlers *******************************************************/ /** Triggered on cursor activity by the editor */ diff --git a/src/LiveDevelopment/Documents/JSDocument.js b/src/LiveDevelopment/Documents/JSDocument.js index d2cb2cbbd3c..01b9700df91 100644 --- a/src/LiveDevelopment/Documents/JSDocument.js +++ b/src/LiveDevelopment/Documents/JSDocument.js @@ -21,7 +21,6 @@ * */ - /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ @@ -54,6 +53,9 @@ define(function JSDocumentModule(require, exports, module) { * @param {Document} the source document */ var JSDocument = function JSDocument(doc, editor) { + if (!editor) { + return; + } this.doc = doc; this.editor = editor; this.script = ScriptAgent.scriptForURL(this.doc.url); @@ -68,13 +70,15 @@ define(function JSDocumentModule(require, exports, module) { /** Close the document */ JSDocument.prototype.close = function close() { + if (!this.editor) { + return; + } Inspector.off("HighlightAgent.highlight", this.onHighlight); $(this.editor).off("change", this.onChange); $(this.editor).off("cursorActivity", this.onCursorActivity); this.onHighlight(); }; - /** Event Handlers *******************************************************/ /** Triggered on cursor activity by the editor */ diff --git a/src/LiveDevelopment/Inspector/Inspector.json b/src/LiveDevelopment/Inspector/Inspector.json index ba1d7bdc167..beab98360ba 100644 --- a/src/LiveDevelopment/Inspector/Inspector.json +++ b/src/LiveDevelopment/Inspector/Inspector.json @@ -87,6 +87,15 @@ { "name": "nodeCount", "type": "array", "items": { "$ref": "NodeCount" }}, { "name": "listenerCount", "type": "array", "items": { "$ref": "ListenerCount" }} ] + }, + { + "id": "MemoryBlock", + "type": "object", + "properties": [ + { "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" }, + { "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" }, + { "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }} + ] } ], "commands": [ @@ -96,6 +105,12 @@ { "name": "domGroups", "type": "array", "items": { "$ref": "DOMGroup" }}, { "name": "strings", "$ref": "StringStatistics" } ] + }, + { + "name": "getProcessMemoryDistribution", + "returns": [ + { "name": "distribution", "$ref": "MemoryBlock", "description": "An object describing all memory allocated by the process"} + ] } ] }, @@ -177,7 +192,7 @@ { "name": "value", "type": "string", "description": "Cookie value." }, { "name": "domain", "type": "string", "description": "Cookie domain." }, { "name": "path", "type": "string", "description": "Cookie path." }, - { "name": "expires", "type": "integer", "description": "Cookie expires." }, + { "name": "expires", "type": "number", "description": "Cookie expires." }, { "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." }, @@ -310,11 +325,21 @@ "hidden": true }, { - "name": "setScreenSizeOverride", - "description": "Overrides the values of window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results", + "name": "canOverrideDeviceMetrics", + "description": "Checks whether setDeviceMetricsOverride can be invoked.", + "returns": [ + { "name": "result", "type": "boolean", "description": "If true, setDeviceMetricsOverride can safely be invoked on the agent." } + ], + "hidden": true + }, + { + "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) and the font scale factor.", "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": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "fontScaleFactor", "type": "number", "description": "Overriding font scale factor value (must be positive). 1 disables the override." }, + { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." } ], "hidden": true }, @@ -325,6 +350,20 @@ { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" } ], "hidden": true + }, + { + "name": "getScriptExecutionStatus", + "description": "Determines if scripts can be executed in the page.", + "returns": [ + { "name": "result", "type": "string", "enum": ["allowed", "disabled", "forbidden"], "description": "Script execution status: \"allowed\" if scripts can be executed, \"disabled\" if script execution has been disabled through page settings, \"forbidden\" if script execution for the given page is not possible for other reasons." } + ] + }, + { + "name": "setScriptExecutionDisabled", + "description": "Switches script execution in the page.", + "parameters": [ + { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } + ] } ], "events": [ @@ -403,6 +442,24 @@ { "name": "value", "type": "any", "optional": true, "description": "Primitive value." }, { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." } ] + }, + { + "id": "ExecutionContextId", + "type": "integer", + "description": "Id of an execution context.", + "hidden": true + }, + { + "id": "ExecutionContextDescription", + "type": "object", + "description": "Description of an isolated world.", + "properties": [ + { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, + { "name": "isPageContext", "type": "boolean", "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context." }, + { "name": "name", "type": "string", "description": "Human readable name describing given context." }, + { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the owning frame." } + ], + "hidden": true } ], "commands": [ @@ -412,8 +469,8 @@ { "name": "expression", "type": "string", "description": "Expression to evaluate." }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, - { "name": "doNotPauseOnExceptions", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions. Overrides setPauseOnException state.", "hidden": true }, - { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Specifies in which frame to perform evaluation.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.", "hidden": true }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." } ], "returns": [ @@ -428,6 +485,7 @@ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." } ], "returns": [ @@ -465,6 +523,23 @@ "name": "run", "hidden": true, "description": "Tells inspected instance(worker or page) that it can run in case it was started paused." + }, + { + "name": "setReportExecutionContextCreation", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Reporting enabled state." } + ], + "hidden": true, + "description": "Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context." + } + ], + "events": [ + { + "name": "isolatedContextCreated", + "parameters": [ + { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created isolated contex." } + ], + "description": "Issued when new isolated context is created." } ] }, @@ -510,22 +585,22 @@ "commands": [ { "name": "enable", - "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification." + "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification." }, { "name": "disable", - "description": "Disables console domain, prevents further console messages from being reported to the client." + "description": "Disables console domain, prevents further console messages from being reported to the client." }, { "name": "clearMessages", - "description": "Clears console messages collected in the browser." + "description": "Clears console messages collected in the browser." }, { "name": "setMonitoringXHREnabled", "parameters": [ { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } ], - "description": "Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.", + "description": "Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.", "hidden": true }, { @@ -540,7 +615,7 @@ "name": "addInspectedHeapObject", "parameters": [ { "name": "heapObjectId", "type": "integer" } - ] + ] } ], "events": [ @@ -665,6 +740,17 @@ { "name": "challengeResponse", "type": "string", "description": "Challenge response." } ] }, + { + "id": "WebSocketFrame", + "type": "object", + "description": "WebSocket frame data.", + "hidden": true, + "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", @@ -749,7 +835,7 @@ "parameters": [ { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." } ], - "description": "Toggles ignoring cache for each request. If true, cache will not be used." + "description": "Toggles ignoring cache for each request. If true, cache will not be used." } ], "events": [ @@ -764,7 +850,6 @@ { "name": "request", "$ref": "Request", "description": "Request data." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." }, - { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace upon issuing this request." }, { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." } ] }, @@ -865,6 +950,36 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } ], "hidden": true + }, + { + "name": "webSocketFrameReceived", + "description": "Fired when WebSocket frame is received.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "webSocketFrameError", + "description": "Fired when WebSocket frame error occurs.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." } + ], + "hidden": true + }, + { + "name": "webSocketFrameSent", + "description": "Fired when WebSocket frame is sent.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true } ] }, @@ -872,13 +987,19 @@ "domain": "Database", "hidden": true, "types": [ + { + "id": "DatabaseId", + "type": "string", + "description": "Unique identifier of Database object.", + "hidden": true + }, { "id": "Database", "type": "object", "description": "Database object.", "hidden": true, "properties": [ - { "name": "id", "type": "string", "description": "Database ID." }, + { "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." } @@ -902,7 +1023,7 @@ { "name": "getDatabaseTableNames", "parameters": [ - { "name": "databaseId", "type": "integer" } + { "name": "databaseId", "$ref": "DatabaseId" } ], "returns": [ { "name": "tableNames", "type": "array", "items": { "type": "string" } } @@ -911,7 +1032,7 @@ { "name": "executeSQL", "parameters": [ - { "name": "databaseId", "type": "integer" }, + { "name": "databaseId", "$ref": "DatabaseId" }, { "name": "query", "type": "string" } ], "returns": [ @@ -973,7 +1094,7 @@ "description": "Object store.", "properties": [ { "name": "name", "type": "string", "description": "Object store name." }, - { "name": "keyPath", "type": "string", "description": "Object store key path." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." }, { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." } ] }, @@ -983,7 +1104,7 @@ "description": "Object store index.", "properties": [ { "name": "name", "type": "string", "description": "Index name." }, - { "name": "keyPath", "type": "string", "description": "Index key path." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." }, { "name": "unique", "type": "boolean", "description": "If true, index is unique." }, { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." } ] @@ -1014,12 +1135,22 @@ { "id": "DataEntry", "type": "object", - "description": "Key.", + "description": "Data entry.", "properties": [ { "name": "key", "$ref": "Key", "description": "Key." }, { "name": "primaryKey", "$ref": "Key", "description": "Primary key." }, { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value." } ] + }, + { + "id": "KeyPath", + "type": "object", + "description": "Key path.", + "properties": [ + { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." }, + { "name": "string", "type": "string", "optional": true, "description": "String value." }, + { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." } + ] } ], "commands": [ @@ -1100,6 +1231,12 @@ "domain": "DOMStorage", "hidden": true, "types": [ + { + "id": "StorageId", + "type": "string", + "description": "Unique identifier of DOM storage entry.", + "hidden": true + }, { "id": "Entry", "type": "object", @@ -1108,8 +1245,15 @@ "properties": [ { "name": "host", "type": "string", "description": "Domain name." }, { "name": "isLocalStorage", "type": "boolean", "description": "True for local storage." }, - { "name": "id", "type": "number", "description": "Entry id for further reference." } + { "name": "id", "$ref": "StorageId", "description": "Entry id for further reference." } ] + }, + { + "id": "Item", + "type": "array", + "description": "DOM Storage item.", + "hidden": true, + "items": { "type": "string" } } ], "commands": [ @@ -1124,16 +1268,16 @@ { "name": "getDOMStorageEntries", "parameters": [ - { "name": "storageId", "type": "integer" } + { "name": "storageId", "$ref": "StorageId" } ], "returns": [ - { "name": "entries", "type": "array", "items": { "$ref": "Entry"} } + { "name": "entries", "type": "array", "items": { "$ref": "Item" } } ] }, { "name": "setDOMStorageItem", "parameters": [ - { "name": "storageId", "type": "integer" }, + { "name": "storageId", "$ref": "StorageId" }, { "name": "key", "type": "string" }, { "name": "value", "type": "string" } ], @@ -1144,7 +1288,7 @@ { "name": "removeDOMStorageItem", "parameters": [ - { "name": "storageId", "type": "integer" }, + { "name": "storageId", "$ref": "StorageId" }, { "name": "key", "type": "string" } ], "returns": [ @@ -1160,9 +1304,9 @@ ] }, { - "name": "updateDOMStorage", + "name": "domStorageUpdated", "parameters": [ - { "name": "storageId", "type": "integer" } + { "name": "storageId", "$ref": "StorageId" } ] } ] @@ -1257,6 +1401,34 @@ { "domain": "FileSystem", "hidden": true, + "types": [ + { + "id": "RequestId", + "type": "integer", + "description": "Request Identifier to glue a request and its completion event." + }, + { + "id": "Entry", + "type": "object", + "properties": [ + { "name": "url", "type": "string", "description": "filesystem: URL for the entry." }, + { "name": "name", "type": "string", "description": "The name of the file or directory." }, + { "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." }, + { "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." }, + { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." } + ], + "description": "Represents a browser side file or directory." + }, + { + "id": "Metadata", + "type": "object", + "properties": [ + { "name": "modificationTime", "type": "number", "description": "Modification time." }, + { "name": "size", "type": "number", "optional": true, "description": "File size. This field is available only for a file." } + ], + "description": "Represents metadata of a file or entry." + } + ], "commands": [ { "name": "enable", @@ -1264,10 +1436,68 @@ }, { "name": "disable", - "description": "Disables events from backend.." + "description": "Disables events from backend." + }, + { + "name": "requestFileSystemRoot", + "parameters": [ + { "name": "origin", "type": "string", "description": "Security origin of requesting FileSystem. One of frames in current page needs to have this security origin." }, + { "name": "type", "type": "string", "enum": ["temporary", "persistent"], "description": "FileSystem type of requesting FileSystem." } + ], + "returns": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding fileSystemRootReceived event should have same requestId with this." } + ], + "description": "Returns root directory of the FileSystem as fileSystemRootReceived event, if exists." + }, + { + "name": "requestDirectoryContent", + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the directory that the frontend is requesting to read from." } + ], + "returns": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding directoryContentReceived event should have same requestId with this." } + ], + "description": "Returns content of the directory as directoryContentReceived event." + }, + { + "name": "requestMetadata", + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the entry that the frontend is requesting to get metadata from." } + ], + "returns": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding metadataReceived event should have same requestId with this." } + ], + "description": "Returns metadata of the entry as metadataReceived event." } ], "events": [ + { + "name": "fileSystemRootReceived", + "parameters": [ + { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned by corresponding requestFileSystemRoot command." }, + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "root", "$ref": "FileSystem.Entry", "optional": true, "description": "Contains root of the requested FileSystem if the command completed successfully." } + ], + "description": "Completion event of requestFileSystemRoot command." + }, + { + "name": "directoryContentReceived", + "parameters": [ + { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned by corresponding requestDirectoryContent command." }, + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "entries", "type": "array", "items": { "$ref": "FileSystem.Entry" }, "optional": true, "description": "Contains all entries on directory if the command completed successfully." } + ], + "description": "Completion event of requestDirectoryContent command." + }, + { + "name": "metadataReceived", + "parameters": [ + { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding getMetadata request." }, + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "metadata", "$ref": "FileSystem.Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." } + ], + "description": "Completion event of getMetadata command." + } ] }, { @@ -1722,6 +1952,12 @@ ], "description": "This object identifies a CSS style in a unique way." }, + { + "id": "StyleSheetOrigin", + "type": "string", + "enum": ["user", "user-agent", "inspector", "regular"], + "description": "Stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets." + }, { "id": "CSSRuleId", "type": "object", @@ -1763,7 +1999,9 @@ "type": "object", "properties": [ { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."}, + { "name": "frameId", "$ref": "Network.FrameId", "description": "Owner frame identifier."}, { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."}, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."}, { "name": "title", "type": "string", "description": "Stylesheet title."}, { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."} ], @@ -1787,7 +2025,7 @@ { "name": "selectorText", "type": "string", "description": "Rule selector."}, { "name": "sourceURL", "type": "string", "optional": true, "description": "Parent stylesheet resource URL (for regular rules)."}, { "name": "sourceLine", "type": "integer", "description": "Line ordinal of the rule selector start character in the resource."}, - { "name": "origin", "type": "string", "enum": ["user", "user-agent", "inspector", "regular"], "description": "The parent stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding new rules created with addRule()), \"regular\" for regular stylesheets."}, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."}, { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." }, { "name": "selectorRange", "$ref": "SourceRange", "optional": true, "description": "The rule selector range in the underlying resource (if available)." }, { "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." } @@ -1814,7 +2052,7 @@ { "name": "name", "type": "string", "description": "Computed style property name." }, { "name": "value", "type": "string", "description": "Computed style property value." } ] - }, + }, { "id": "CSSStyle", "type": "object", @@ -2071,6 +2309,14 @@ ], "hidden": true, "description": "Starts calculating various DOM statistics and sending them as part of timeline events." + }, + { + "name": "supportsFrameInstrumentation", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if timeline supports frame instrumentation." } + ], + "hidden": true, + "description": "Tells whether timeline agent supports frame instrumentation." } ], "events": [ @@ -2120,7 +2366,8 @@ { "name": "location", "$ref": "Location", "description": "Location of the function." }, { "name": "name", "type": "string", "optional": true, "description": "Name of the function. Not present for anonymous functions." }, { "name": "displayName", "type": "string", "optional": true, "description": "Display name of the function(specified in 'displayName' property on the function object)." }, - { "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." } + { "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." }, + { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." } ], "description": "Information about the function." }, @@ -2156,12 +2403,12 @@ "description": "Tells whether enabling debugger causes scripts recompilation." }, { - "name": "supportsNativeBreakpoints", + "name": "supportsSeparateScriptCompilationAndExecution", "returns": [ - { "name": "result", "type": "boolean", "description": "True if debugger supports native breakpoints." } + { "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." } ], "hidden": true, - "description": "Tells whether debugger supports native breakpoints." + "description": "Tells whether debugger supports separate script compilation and execution." }, { "name": "enable", @@ -2189,7 +2436,7 @@ ], "returns": [ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, - { "name": "locations", "optional": true, "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into upon addition." } + { "name": "locations", "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into upon addition." } ], "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads." }, @@ -2272,6 +2519,18 @@ ], "description": "Edits JavaScript source live." }, + { + "name": "restartFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." } + ], + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame"}, "description": "New stack trace." }, + { "name": "result", "type": "object", "description": "VM-specific description.", "hidden": true } + ], + "hidden": true, + "description": "Restarts particular call frame from the beginning." + }, { "name": "getScriptSource", "parameters": [ @@ -2307,6 +2566,7 @@ { "name": "expression", "type": "string", "description": "Expression to evaluate." }, { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup)." }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." } ], "returns": [ @@ -2314,6 +2574,34 @@ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } ], "description": "Evaluates expression on a given call frame." + }, + { + "name": "compileScript", + "hidden": true, + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to compile." }, + { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." } + ], + "returns": [ + { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." }, + { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." } + ], + "description": "Compiles expression." + }, + { + "name": "runScript", + "hidden": true, + "parameters": [ + { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." } + ], + "description": "Runs script with given id in a given context." } ], "events": [ @@ -2448,14 +2736,29 @@ "hidden": true, "types": [ { - "id": "Profile", + "id": "ProfileHeader", "type": "object", - "description": "Profile." + "description": "Profile header.", + "properties": [ + { "name": "typeId", "type": "string", "enum": ["CPU", "CSS", "HEAP"], "description": "Profile type name." }, + { "name": "title", "type": "string", "description": "Profile title." }, + { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }, + { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." } + ] }, { - "id": "ProfileHeader", + "id": "Profile", "type": "object", - "description": "Profile header." + "description": "Profile.", + "properties": [ + { "name": "head", "type": "object", "optional": true }, + { "name": "bottomUpHead", "type": "object", "optional": true } + ] + }, + { + "id": "HeapSnapshotObjectId", + "type": "string", + "description": "Heap snashot object id." } ], "commands": [ @@ -2524,12 +2827,21 @@ { "name": "getObjectByHeapObjectId", "parameters": [ - { "name": "objectId", "type": "integer" }, + { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } ], "returns": [ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } ] + }, + { + "name": "getHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } + ], + "returns": [ + { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } + ] } ], "events": [ @@ -2633,5 +2945,21 @@ "name": "disconnectedFromWorker" } ] + }, + { + "domain": "WebGL", + "hidden": true, + "types": [], + "commands": [ + { + "name": "enable", + "description": "Enables WebGL inspection." + }, + { + "name": "disable", + "description": "Disables WebGL inspection." + } + ], + "events": [] }] -} +} \ No newline at end of file diff --git a/src/LiveDevelopment/Inspector/inspector.html b/src/LiveDevelopment/Inspector/inspector.html index e76989d0ba0..40a1b375304 100644 --- a/src/LiveDevelopment/Inspector/inspector.html +++ b/src/LiveDevelopment/Inspector/inspector.html @@ -1,5 +1,4 @@ - Inspector 1.0 Documentation @@ -72,6 +71,7 @@
  • Profiler
  • Runtime
  • Timeline
  • +
  • WebGL
  • Worker
  • @@ -106,6 +106,7 @@

    CSS

    @@ -420,6 +446,9 @@

    Network

  • Network.webSocketHandshakeResponseReceived: Fired when WebSocket handshake response becomes available.
  • Network.webSocketCreated: Fired upon WebSocket creation.
  • Network.webSocketClosed: Fired when WebSocket is closed.
  • +
  • Network.webSocketFrameReceived: Fired when WebSocket frame is received.
  • +
  • Network.webSocketFrameError: Fired when WebSocket frame error occurs.
  • +
  • Network.webSocketFrameSent: Fired when WebSocket frame is sent.
  • Page

    Type @@ -447,8 +476,11 @@

    Page

  • Page.searchInResource: Searches for given string in resource content.
  • Page.searchInResources: Searches for given string in frame / resource tree structure.
  • Page.setDocumentContent: Sets given markup as the document's HTML.
  • -
  • Page.setScreenSizeOverride: Overrides the values of window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results
  • +
  • Page.canOverrideDeviceMetrics: Checks whether setDeviceMetricsOverride can be invoked.
  • +
  • Page.setDeviceMetricsOverride: 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) and the font scale factor.
  • Page.setShowPaintRects: Requests that backend shows paint rectangles
  • +
  • Page.getScriptExecutionStatus: Determines if scripts can be executed in the page.
  • +
  • Page.setScriptExecutionDisabled: Switches script execution in the page.
  • Event Event +

    WebGL

    +Command +

    Worker

    Command Command Command

    Memory.NodeCount Type

    @@ -3747,6 +4094,17 @@

    Memory.DOMGroup Type

    [Memory.ListenerCount]
    +
    +

    Memory.MemoryBlock Type

    +
    +
    size (optional)
    +
    Number Size of the block in bytes if available
    +
    name
    +
    String Unique name used to identify the component that allocated this block
    +
    children (optional)
    +
    [Memory.MemoryBlock]
    +
    +

    Memory.getDOMNodeCount Command

    Callback Parameters:

    @@ -3764,6 +4122,21 @@

    Code Example:

    });
    +
    +

    Memory.getProcessMemoryDistribution Command

    +

    Callback Parameters:

    +
    +
    distribution
    +
    Memory.MemoryBlock An object describing all memory allocated by the process
    +
    +

    Code Example:

    +
    +// WebInspector Command: Memory.getProcessMemoryDistribution
    +Memory.getProcessMemoryDistribution(function callback(res) {
    +	// res = {distribution}
    +});
    +
    +

    Network

    @@ -3780,6 +4153,7 @@

    Network

  • Network.Response: HTTP response data.
  • Network.WebSocketRequest: WebSocket request data.
  • Network.WebSocketResponse: WebSocket response data.
  • +
  • Network.WebSocketFrame: WebSocket frame data.
  • Network.CachedResource: Information about the cached resource.
  • Network.Initiator: Information about the request initiator.
  • @@ -3809,6 +4183,9 @@

    Network

  • Network.webSocketHandshakeResponseReceived: Fired when WebSocket handshake response becomes available.
  • Network.webSocketCreated: Fired upon WebSocket creation.
  • Network.webSocketClosed: Fired when WebSocket is closed.
  • +
  • Network.webSocketFrameReceived: Fired when WebSocket frame is received.
  • +
  • Network.webSocketFrameError: Fired when WebSocket frame error occurs.
  • +
  • Network.webSocketFrameSent: Fired when WebSocket frame is sent.
  • Network.LoaderId Type

    @@ -3940,6 +4317,18 @@

    Network.WebSocketResponse Type

    String Challenge response.
    +
    +

    Network.WebSocketFrame Type

    +

    WebSocket frame data.

    +
    +
    opcode
    +
    Number WebSocket frame opcode.
    +
    mask
    +
    Boolean WebSocke frame mask.
    +
    payloadData
    +
    String WebSocke frame payload data.
    +
    +

    Network.CachedResource Type

    Information about the cached resource.

    @@ -4115,8 +4504,6 @@

    Network.requestWillBeSent Event

    Network.Timestamp Timestamp.
    initiator
    Network.Initiator Request initiator.
    -
    stackTrace (optional)
    -
    Console.StackTrace JavaScript stack trace upon issuing this request.
    redirectResponse (optional)
    Network.Response Redirect response data.
    @@ -4124,7 +4511,7 @@

    Code Example:

     // WebInspector Event: Network.requestWillBeSent
     function onRequestWillBeSent(res) {
    -	// res = {requestId, frameId, loaderId, documentURL, request, timestamp, initiator, stackTrace, redirectResponse}
    +	// res = {requestId, frameId, loaderId, documentURL, request, timestamp, initiator, redirectResponse}
     }
     
    @@ -4326,6 +4713,63 @@

    Code Example:

    } +
    +

    Network.webSocketFrameReceived Event

    +

    Fired when WebSocket frame is received.

    +
    +
    requestId
    +
    Network.RequestId Request identifier.
    +
    timestamp
    +
    Network.Timestamp Timestamp.
    +
    response
    +
    Network.WebSocketFrame WebSocket response data.
    +
    +

    Code Example:

    +
    +// WebInspector Event: Network.webSocketFrameReceived
    +function onWebSocketFrameReceived(res) {
    +	// res = {requestId, timestamp, response}
    +}
    +
    +
    +
    +

    Network.webSocketFrameError Event

    +

    Fired when WebSocket frame error occurs.

    +
    +
    requestId
    +
    Network.RequestId Request identifier.
    +
    timestamp
    +
    Network.Timestamp Timestamp.
    +
    errorMessage
    +
    String WebSocket frame error message.
    +
    +

    Code Example:

    +
    +// WebInspector Event: Network.webSocketFrameError
    +function onWebSocketFrameError(res) {
    +	// res = {requestId, timestamp, errorMessage}
    +}
    +
    +
    +
    +

    Network.webSocketFrameSent Event

    +

    Fired when WebSocket frame is sent.

    +
    +
    requestId
    +
    Network.RequestId Request identifier.
    +
    timestamp
    +
    Network.Timestamp Timestamp.
    +
    response
    +
    Network.WebSocketFrame WebSocket response data.
    +
    +

    Code Example:

    +
    +// WebInspector Event: Network.webSocketFrameSent
    +function onWebSocketFrameSent(res) {
    +	// res = {requestId, timestamp, response}
    +}
    +
    +

    Page

    @@ -4355,8 +4799,11 @@

    Page

  • Page.searchInResource: Searches for given string in resource content.
  • Page.searchInResources: Searches for given string in frame / resource tree structure.
  • Page.setDocumentContent: Sets given markup as the document's HTML.
  • -
  • Page.setScreenSizeOverride: Overrides the values of window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results
  • +
  • Page.canOverrideDeviceMetrics: Checks whether setDeviceMetricsOverride can be invoked.
  • +
  • Page.setDeviceMetricsOverride: 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) and the font scale factor.
  • Page.setShowPaintRects: Requests that backend shows paint rectangles
  • +
  • Page.getScriptExecutionStatus: Determines if scripts can be executed in the page.
  • +
  • Page.setScriptExecutionDisabled: Switches script execution in the page.
  • Event
      @@ -4439,7 +4886,7 @@

      Page.Cookie Type

      path
      String Cookie path.
      expires
      -
      Integer Cookie expires.
      +
      Number Cookie expires.
      size
      Integer Cookie size.
      httpOnly
      @@ -4674,19 +5121,39 @@

      Code Example:

      Page.setDocumentContent(frameId, html); -
      -

      Page.setScreenSizeOverride Command

      -

      Overrides the values of window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results

      +
      +

      Page.canOverrideDeviceMetrics Command

      +

      Checks whether setDeviceMetricsOverride can be invoked.

      +

      Callback Parameters:

      +
      +
      result
      +
      Boolean If true, setDeviceMetricsOverride can safely be invoked on the agent.
      +
      +

      Code Example:

      +
      +// WebInspector Command: Page.canOverrideDeviceMetrics
      +Page.canOverrideDeviceMetrics(function callback(res) {
      +	// res = {result}
      +});
      +
      +
      +
      +

      Page.setDeviceMetricsOverride Command

      +

      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) and the font scale factor.

      width
      Integer Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
      height
      Integer Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
      +
      fontScaleFactor
      +
      Number Overriding font scale factor value (must be positive). 1 disables the override.
      +
      fitWindow
      +
      Boolean Whether a view that exceeds the available browser window area should be scaled down to fit.

      Code Example:

      -// WebInspector Command: Page.setScreenSizeOverride
      -Page.setScreenSizeOverride(width, height);
      +// WebInspector Command: Page.setDeviceMetricsOverride
      +Page.setDeviceMetricsOverride(width, height, fontScaleFactor, fitWindow);
       
      @@ -4702,6 +5169,35 @@

      Code Example:

      Page.setShowPaintRects(result);
      +
      +

      Page.getScriptExecutionStatus Command

      +

      Determines if scripts can be executed in the page.

      +

      Callback Parameters:

      +
      +
      result
      +
      ( allowed | disabled | forbidden ) Script execution status: "allowed" if scripts can be executed, "disabled" if script execution has been disabled through page settings, "forbidden" if script execution for the given page is not possible for other reasons.
      +
      +

      Code Example:

      +
      +// WebInspector Command: Page.getScriptExecutionStatus
      +Page.getScriptExecutionStatus(function callback(res) {
      +	// res = {result}
      +});
      +
      +
      +
      +

      Page.setScriptExecutionDisabled Command

      +

      Switches script execution in the page.

      +
      +
      value
      +
      Boolean Whether script execution should be disabled in the page.
      +
      +

      Code Example:

      +
      +// WebInspector Command: Page.setScriptExecutionDisabled
      +Page.setScriptExecutionDisabled(value);
      +
      +

      Page.domContentEventFired Event

      @@ -4766,8 +5262,9 @@

      Profiler

      Type Command Event +
      +

      Profiler.ProfileHeader Type

      +

      Profile header.

      +
      +
      typeId
      +
      ( CPU | CSS | HEAP ) Profile type name.
      +
      title
      +
      String Profile title.
      +
      uid
      +
      Integer Unique identifier of the profile.
      +
      maxJSObjectId (optional)
      +
      Integer Last seen JS object Id.
      +
      +

      Profiler.Profile Type

      Profile.

      +
      +
      head (optional)
      +
      Object
      +
      bottomUpHead (optional)
      +
      Object
      +
      -
      -

      Profiler.ProfileHeader Type

      -

      Profile header.

      +
      +

      Profiler.HeapSnapshotObjectId Type

      +

      Heap snashot object id.

      +
      +
      String
      +

      Profiler.causesRecompilation Command

      @@ -4958,7 +5479,7 @@

      Code Example:

      Profiler.getObjectByHeapObjectId Command

      objectId
      -
      Integer
      +
      Profiler.HeapSnapshotObjectId
      objectGroup (optional)
      String Symbolic group name that can be used to release multiple objects.
      @@ -4975,6 +5496,25 @@

      Code Example:

      });
      +
      +

      Profiler.getHeapObjectId Command

      +
      +
      objectId
      +
      Runtime.RemoteObjectId Identifier of the object to get heap object id for.
      +
      +

      Callback Parameters:

      +
      +
      heapSnapshotObjectId
      +
      Profiler.HeapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.
      +
      +

      Code Example:

      +
      +// WebInspector Command: Profiler.getHeapObjectId
      +Profiler.getHeapObjectId(objectId, function callback(res) {
      +	// res = {heapSnapshotObjectId}
      +});
      +
      +

      Profiler.addProfileHeader Event

      @@ -5069,6 +5609,8 @@

      Runtime

    • Runtime.RemoteObject: Mirror object referencing original JavaScript object.
    • Runtime.PropertyDescriptor: Object property descriptor.
    • Runtime.CallArgument: Represents function call argument. Either remote object id objectId or primitive value or neither of (for undefined) them should be specified.
    • +
    • Runtime.ExecutionContextId: Id of an execution context.
    • +
    • Runtime.ExecutionContextDescription: Description of an isolated world.
    Command
      @@ -5078,6 +5620,11 @@

      Runtime

    • Runtime.releaseObject: Releases remote object with given id.
    • Runtime.releaseObjectGroup: Releases all remote objects that belong to a given group.
    • Runtime.run: Tells inspected instance(worker or page) that it can run in case it was started paused.
    • +
    • Runtime.setReportExecutionContextCreation: Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.
    • +
    +Event +

    Runtime.RemoteObjectId Type

    @@ -5136,6 +5683,27 @@

    Runtime.CallArgument Type

    Runtime.RemoteObjectId Remote object handle.
    +
    +

    Runtime.ExecutionContextId Type

    +

    Id of an execution context.

    +
    +
    Integer
    +
    +
    +
    +

    Runtime.ExecutionContextDescription Type

    +

    Description of an isolated world.

    +
    +
    id
    +
    Runtime.ExecutionContextId Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
    +
    isPageContext
    +
    Boolean True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.
    +
    name
    +
    String Human readable name describing given context.
    +
    frameId
    +
    Network.FrameId Id of the owning frame.
    +
    +

    Runtime.evaluate Command

    Evaluates expression on global object.

    @@ -5146,10 +5714,10 @@

    Runtime.evaluate Command

    String Symbolic group name that can be used to release multiple objects.
    includeCommandLineAPI (optional)
    Boolean Determines whether Command Line API should be available during the evaluation.
    -
    doNotPauseOnExceptions (optional)
    -
    Boolean Specifies whether evaluation should stop on exceptions. Overrides setPauseOnException state.
    -
    frameId (optional)
    -
    Network.FrameId Specifies in which frame to perform evaluation.
    +
    doNotPauseOnExceptionsAndMuteConsole (optional)
    +
    Boolean Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.
    +
    contextId (optional)
    +
    Runtime.ExecutionContextId Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
    returnByValue (optional)
    Boolean Whether the result is expected to be a JSON object that should be sent by value.
    @@ -5163,7 +5731,7 @@

    Callback Parameters:

    Code Example:

     // WebInspector Command: Runtime.evaluate
    -Runtime.evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptions, frameId, returnByValue, function callback(res) {
    +Runtime.evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, contextId, returnByValue, function callback(res) {
     	// res = {result, wasThrown}
     });
     
    @@ -5178,6 +5746,8 @@

    Runtime.callFunctionOn Command

    String Declaration of the function to call.
    arguments (optional)
    [Runtime.CallArgument] Call arguments. All call arguments must belong to the same JavaScript world as the target object.
    +
    doNotPauseOnExceptionsAndMuteConsole (optional)
    +
    Boolean Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.
    returnByValue (optional)
    Boolean Whether the result is expected to be a JSON object which should be sent by value.
    @@ -5191,7 +5761,7 @@

    Callback Parameters:

    Code Example:

     // WebInspector Command: Runtime.callFunctionOn
    -Runtime.callFunctionOn(objectId, functionDeclaration, arguments, returnByValue, function callback(res) {
    +Runtime.callFunctionOn(objectId, functionDeclaration, arguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, function callback(res) {
     	// res = {result, wasThrown}
     });
     
    @@ -5253,6 +5823,34 @@

    Code Example:

    Runtime.run();
    +
    +

    Runtime.setReportExecutionContextCreation Command

    +

    Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.

    +
    +
    enabled
    +
    Boolean Reporting enabled state.
    +
    +

    Code Example:

    +
    +// WebInspector Command: Runtime.setReportExecutionContextCreation
    +Runtime.setReportExecutionContextCreation(enabled);
    +
    +
    +
    +

    Runtime.isolatedContextCreated Event

    +

    Issued when new isolated context is created.

    +
    +
    context
    +
    Runtime.ExecutionContextDescription A newly created isolated contex.
    +
    +

    Code Example:

    +
    +// WebInspector Event: Runtime.isolatedContextCreated
    +function onIsolatedContextCreated(res) {
    +	// res = {context}
    +}
    +
    +

    Timeline

    @@ -5266,6 +5864,7 @@

    Timeline

  • Timeline.start: Starts capturing instrumentation events.
  • Timeline.stop: Stops capturing instrumentation events.
  • Timeline.setIncludeMemoryDetails: Starts calculating various DOM statistics and sending them as part of timeline events.
  • +
  • Timeline.supportsFrameInstrumentation: Tells whether timeline agent supports frame instrumentation.
  • Event
      @@ -5318,6 +5917,22 @@

      Code Example:

      Timeline.setIncludeMemoryDetails(enabled); +
      +

      Timeline.supportsFrameInstrumentation Command

      +

      Tells whether timeline agent supports frame instrumentation.

      +

      Callback Parameters:

      +
      +
      result
      +
      Boolean True if timeline supports frame instrumentation.
      +
      +

      Code Example:

      +
      +// WebInspector Command: Timeline.supportsFrameInstrumentation
      +Timeline.supportsFrameInstrumentation(function callback(res) {
      +	// res = {result}
      +});
      +
      +

      Timeline.eventRecorded Event

      Fired for every instrumentation event while timeline is started.

      @@ -5334,6 +5949,33 @@

      Code Example:

    +
    +

    WebGL

    +

    +Command + +
    +

    WebGL.enable Command

    +

    Enables WebGL inspection.

    +

    Code Example:

    +
    +// WebInspector Command: WebGL.enable
    +WebGL.enable();
    +
    +
    +
    +

    WebGL.disable Command

    +

    Disables WebGL inspection.

    +

    Code Example:

    +
    +// WebInspector Command: WebGL.disable
    +WebGL.disable();
    +
    +
    +

    Worker

    @@ -5475,7 +6117,7 @@

    Code Example:

    -

    Generated from Inspector.json v1.0 on 2012-03-18 22:23:32-0700

    +

    Generated from Inspector.json v1.0 on 2012-06-26 16:53:00+0200

    Implementation by Jonathan Diehl

    diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index df5dc59d736..1cbe5457aaa 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -92,14 +92,14 @@ define(function LiveDevelopment(require, exports, module) { var matches = /^(.*\/)(.+\.([^.]+))$/.exec(doc.file.fullPath); if (matches) { var prefix = "file://"; - + // The file.fullPath on Windows starts with a drive letter ("C:"). // In order to make it a valid file: URL we need to add an // additional slash to the prefix. if (brackets.platform === "win") { prefix += "/"; } - + doc.extension = matches[3]; doc.url = encodeURI(prefix + doc.file.fullPath); @@ -109,7 +109,7 @@ define(function LiveDevelopment(require, exports, module) { doc.root = {url: encodeURI(prefix + matches[1] + fileName)}; } } - + /** Get the current document from the document manager * _adds extension, url and root to the document */ @@ -128,7 +128,6 @@ define(function LiveDevelopment(require, exports, module) { switch (doc.extension) { case "css": return CSSDocument; - /* FUTURE: case "js": return JSDocument; case "html": @@ -136,12 +135,11 @@ define(function LiveDevelopment(require, exports, module) { return HTMLDocument; default: throw "Invalid document type: " + doc.extension; - */ } - + return null; } - + /** * Removes the given CSS/JSDocument from _relatedDocuments. Signals that the * given file is no longer associated with the HTML document that is live (e.g. @@ -169,7 +167,7 @@ define(function LiveDevelopment(require, exports, module) { _relatedDocuments = undefined; } } - + /** Create a live version of a Brackets document */ function _createDocument(doc, editor) { var DocClass = _classForDocument(doc); @@ -179,7 +177,7 @@ define(function LiveDevelopment(require, exports, module) { return null; } } - + /** Convert a file: URL to a local full file path */ function _urlToPath(url) { var path; @@ -259,7 +257,7 @@ define(function LiveDevelopment(require, exports, module) { // Show the message, but include the error object for further information (e.g. error code) console.error(message, error); } - + /** Run when all agents are loaded */ function _onLoad() { var doc = _getCurrentDocument(); @@ -289,7 +287,7 @@ define(function LiveDevelopment(require, exports, module) { var doc = _getCurrentDocument(); var browserStarted = false; var retryCount = 0; - + function showWrongDocError() { Dialogs.showModalDialog( Dialogs.DIALOG_ID_ERROR, @@ -297,19 +295,21 @@ define(function LiveDevelopment(require, exports, module) { Strings.LIVE_DEV_NEED_HTML_MESSAGE ); } - + if (!doc || !doc.root) { showWrongDocError(); - + } else { // For Sprint 6, we only open live development connections for HTML files // FUTURE: Remove this test when we support opening connections for different // file types. - if (!doc.extension || doc.extension.indexOf("htm") !== 0) { + /* + if (!doc.extension || doc.extension.indexOf('htm') !== 0) { showWrongDocError(); return; } - + */ + _setStatus(1); Inspector.connectToURL(doc.root.url).fail(function onConnectFail(err) { if (err === "CANCEL") { @@ -340,7 +340,7 @@ define(function LiveDevelopment(require, exports, module) { return; } retryCount++; - + if (!browserStarted && exports.status !== -1) { // If err === FileError.ERR_NOT_FOUND, it means a remote debugger connection // is available, but the requested URL is not loaded in the browser. In that @@ -357,14 +357,14 @@ define(function LiveDevelopment(require, exports, module) { }) .fail(function (err) { var message; - + _setStatus(-1); if (err === FileError.NOT_FOUND_ERR) { message = Strings.ERROR_CANT_FIND_CHROME; } else { message = StringUtils.format(Strings.ERROR_LAUNCHING_BROWSER, err); } - + Dialogs.showModalDialog( Dialogs.DIALOG_ID_ERROR, Strings.ERROR_LAUNCHING_BROWSER_TITLE, @@ -372,7 +372,7 @@ define(function LiveDevelopment(require, exports, module) { ); }); } - + if (exports.status !== -1) { window.setTimeout(function retryConnect() { Inspector.connectToURL(doc.root.url).fail(onConnectFail); @@ -397,7 +397,7 @@ define(function LiveDevelopment(require, exports, module) { if (!doc) { return; } - + if (Inspector.connected()) { if (agents.network && agents.network.wasURLRequested(doc.url)) { _closeDocument(); @@ -415,7 +415,7 @@ define(function LiveDevelopment(require, exports, module) { window.setTimeout(open); } } - + function getLiveDocForPath(path) { var docsToSearch = []; if (_relatedDocuments) { @@ -432,7 +432,7 @@ define(function LiveDevelopment(require, exports, module) { } return false; }); - + return foundDoc; } diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index b82326aaa91..516c745697c 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -21,7 +21,6 @@ * */ - /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $, less, window, XMLHttpRequest */ @@ -63,7 +62,7 @@ define(function main(require, exports, module) { Strings.LIVE_DEV_STATUS_TIP_PROGRESS2, Strings.LIVE_DEV_STATUS_TIP_CONNECTED]; // Status indicator tooltip var _statusStyle = ["warning", "", "info", "info", "success"]; // Status indicator's CSS class var _allStatusStyles = _statusStyle.join(" "); - + var _$btnGoLive; // reference to the GoLive button var _$btnHighlight; // reference to the HighlightButton @@ -90,7 +89,7 @@ define(function main(require, exports, module) { // Clear text/styles from previous status $("span", $btn).remove(); $btn.removeClass(_allStatusStyles); - + // Set text/styles for new status if (text && text.length > 0) { $("") @@ -100,7 +99,7 @@ define(function main(require, exports, module) { } else { $btn.addClass(style); } - + if (tooltip) { $btn.attr("title", tooltip); } @@ -128,8 +127,9 @@ define(function main(require, exports, module) { // See the comments at the top of LiveDevelopment.js for details on the // various status codes. _setLabel(_$btnGoLive, null, _statusStyle[status + 1], _statusTooltip[status + 1]); + window.sessionStorage.setItem("live.enabled", status === 3); }); - + // Initialize tooltip for 'not connected' state _setLabel(_$btnGoLive, null, _statusStyle[1], _statusTooltip[1]); } @@ -153,6 +153,15 @@ define(function main(require, exports, module) { } } + /** Setup autostarting of the live development connection */ + function _setupAutoStart() { + var $DocumentManager = $(DocumentManager); + $DocumentManager.on("currentDocumentChange", function goLive() { + _handleGoLiveCommand(); + $DocumentManager.off("currentDocumentChange", goLive); + }); + } + /** Setup window references to useful LiveDevelopment modules */ function _setupDebugHelpers() { window.ld = LiveDevelopment; @@ -170,6 +179,9 @@ define(function main(require, exports, module) { if (config.debug) { _setupDebugHelpers(); } + if (window.sessionStorage.getItem("live.enabled") === "true") { + _setupAutoStart(); + } } window.setTimeout(init); From 6d8f54322fbdbedb889fc68c73e07c1216ed3958 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Thu, 26 Jul 2012 22:57:38 +0200 Subject: [PATCH 03/20] do not cache the script as it changes when the browser reloads --- src/LiveDevelopment/Documents/JSDocument.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/LiveDevelopment/Documents/JSDocument.js b/src/LiveDevelopment/Documents/JSDocument.js index 01b9700df91..b647ad00fd0 100644 --- a/src/LiveDevelopment/Documents/JSDocument.js +++ b/src/LiveDevelopment/Documents/JSDocument.js @@ -58,7 +58,6 @@ define(function JSDocumentModule(require, exports, module) { } this.doc = doc; this.editor = editor; - this.script = ScriptAgent.scriptForURL(this.doc.url); this.onHighlight = this.onHighlight.bind(this); this.onChange = this.onChange.bind(this); this.onCursorActivity = this.onCursorActivity.bind(this); @@ -79,6 +78,11 @@ define(function JSDocumentModule(require, exports, module) { this.onHighlight(); }; + JSDocument.prototype.script = function script() { + return ScriptAgent.scriptForURL(this.doc.url); + }; + + /** Event Handlers *******************************************************/ /** Triggered on cursor activity by the editor */ @@ -88,7 +92,7 @@ define(function JSDocumentModule(require, exports, module) { /** Triggered on change by the editor */ JSDocument.prototype.onChange = function onChange(event, editor, change) { var src = this.doc.getText(); - Inspector.Debugger.setScriptSource(this.script.scriptId, src, function onSetScriptSource(res) { + Inspector.Debugger.setScriptSource(this.script().scriptId, src, function onSetScriptSource(res) { Inspector.Runtime.evaluate("if($)$(\"canvas\").each(function(i,e){if(e.rerender)e.rerender()})"); }.bind(this)); }; @@ -107,10 +111,11 @@ define(function JSDocumentModule(require, exports, module) { } // go through the trace and find highlight the lines of this script + var scriptId = this.script().scriptId; var callFrame, line; for (i in node.trace) { callFrame = node.trace[i]; - if (callFrame.location && callFrame.location.scriptId === this.script.scriptId) { + if (callFrame.location && callFrame.location.scriptId === scriptId) { line = callFrame.location.lineNumber; codeMirror.setLineClass(line, "highlight"); this._highlight.push(line); From 818a175237dc76a8794ed7d79f3d87b88ba20fe5 Mon Sep 17 00:00:00 2001 From: Joel Brandt Date: Thu, 26 Jul 2012 14:09:06 -0700 Subject: [PATCH 04/20] fix jslint error --- src/LiveDevelopment/LiveDevelopment.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index 1cbe5457aaa..1d344855f92 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -137,7 +137,6 @@ define(function LiveDevelopment(require, exports, module) { throw "Invalid document type: " + doc.extension; } - return null; } /** From cfef0699d32c3ff3119a888c7ca4ef8a27e0da5d Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Fri, 27 Jul 2012 08:19:25 +0200 Subject: [PATCH 05/20] wait for the proper event to auto connect live --- src/LiveDevelopment/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index 516c745697c..c7e4b5f90cd 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ -/*global define, $, less, window, XMLHttpRequest */ +/*global brackets, define, $, less, window, XMLHttpRequest */ /** * main integrates LiveDevelopment into Brackets @@ -155,10 +155,10 @@ define(function main(require, exports, module) { /** Setup autostarting of the live development connection */ function _setupAutoStart() { - var $DocumentManager = $(DocumentManager); - $DocumentManager.on("currentDocumentChange", function goLive() { - _handleGoLiveCommand(); - $DocumentManager.off("currentDocumentChange", goLive); + brackets.ready(function() { + if (DocumentManager.getCurrentDocument()) { + _handleGoLiveCommand(); + } }); } From 1671a250c32271db63a6f3c835a90c8e996f1062 Mon Sep 17 00:00:00 2001 From: Dennis Kehrig Date: Fri, 27 Jul 2012 15:03:49 +0200 Subject: [PATCH 06/20] Made GotoAgent focus the editor --- src/LiveDevelopment/Agents/GotoAgent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index 1a40553c87d..ca66ce4ec4e 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -142,6 +142,7 @@ define(function GotoAgent(require, exports, module) { codeMirror.setCursor(location); codeMirror.setLineClass(location.line, "flash"); window.setTimeout(codeMirror.setLineClass.bind(codeMirror, location.line), 1000); + editor.focus(); } /** Open the editor at the given url and editor location From c2eab827071674609d27a6432f1ea012e8bbab04 Mon Sep 17 00:00:00 2001 From: Joel Brandt Date: Fri, 27 Jul 2012 10:13:48 -0700 Subject: [PATCH 07/20] fix one jslint error, and re-fix one earlier jslint fix better --- src/LiveDevelopment/LiveDevelopment.js | 2 +- src/LiveDevelopment/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index 328cdd9dc15..c2b58315aeb 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -148,7 +148,7 @@ define(function LiveDevelopment(require, exports, module) { case "htm": return HTMLDocument; default: - throw "Invalid document type: " + doc.extension; + return null; } } diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index c7e4b5f90cd..639893fa7c1 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -155,7 +155,7 @@ define(function main(require, exports, module) { /** Setup autostarting of the live development connection */ function _setupAutoStart() { - brackets.ready(function() { + brackets.ready(function () { if (DocumentManager.getCurrentDocument()) { _handleGoLiveCommand(); } From 0322966107592a8c2c5b3ee95684f31d41cc0a99 Mon Sep 17 00:00:00 2001 From: Dennis Kehrig Date: Sat, 28 Jul 2012 20:24:51 +0200 Subject: [PATCH 08/20] Made GotoAgent.open return a deferred --- src/LiveDevelopment/Agents/GotoAgent.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index ca66ce4ec4e..e1487eb1534 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -151,6 +151,9 @@ define(function GotoAgent(require, exports, module) { */ function open(url, location) { console.assert(url.substr(0, 7) === "file://", "Cannot open non-file URLs"); + + var result = new $.Deferred(); + url = _urlWithoutQueryString(url); var path = url.substr(7); var promise = DocumentManager.getDocumentForPath(path); @@ -159,10 +162,14 @@ define(function GotoAgent(require, exports, module) { if (location) { openLocation(location); } + result.resolve(); }); promise.fail(function onErr(err) { console.error(err); + result.reject(err); }); + + return result.promise(); } /** Go to the given source node */ From feed87274eeb3609b7844f52a50ac8900dbb0f63 Mon Sep 17 00:00:00 2001 From: Dennis Kehrig Date: Sat, 28 Jul 2012 20:28:27 +0200 Subject: [PATCH 09/20] Made GotoAgent's flash optional (allows to use a different line class after jumping and prevents it from being removed after 1s when the flash is over) --- src/LiveDevelopment/Agents/GotoAgent.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index e1487eb1534..467f17d23df 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -133,23 +133,26 @@ define(function GotoAgent(require, exports, module) { /** Point the master editor to the given location * @param {integer} location in file */ - function openLocation(location) { + function openLocation(location, noFlash) { var editor = EditorManager.getCurrentFullEditor(); var codeMirror = editor._codeMirror; if (typeof location === "number") { location = codeMirror.posFromIndex(location); } codeMirror.setCursor(location); - codeMirror.setLineClass(location.line, "flash"); - window.setTimeout(codeMirror.setLineClass.bind(codeMirror, location.line), 1000); editor.focus(); + + if (! noFlash) { + codeMirror.setLineClass(location.line, "flash"); + window.setTimeout(codeMirror.setLineClass.bind(codeMirror, location.line), 1000); + } } /** Open the editor at the given url and editor location * @param {string} url * @param {integer} optional location in file */ - function open(url, location) { + function open(url, location, noFlash) { console.assert(url.substr(0, 7) === "file://", "Cannot open non-file URLs"); var result = new $.Deferred(); @@ -160,7 +163,7 @@ define(function GotoAgent(require, exports, module) { promise.done(function onDone(doc) { DocumentManager.setCurrentDocument(doc); if (location) { - openLocation(location); + openLocation(location, noFlash); } result.resolve(); }); From 009928e4e147e16e0333847382cc60456261f66a Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Tue, 31 Jul 2012 09:35:22 +0200 Subject: [PATCH 10/20] updated to latest Inspector.json --- src/LiveDevelopment/Inspector/Inspector.json | 142 +++++++++++++++---- 1 file changed, 114 insertions(+), 28 deletions(-) diff --git a/src/LiveDevelopment/Inspector/Inspector.json b/src/LiveDevelopment/Inspector/Inspector.json index beab98360ba..88e8f3b95e6 100644 --- a/src/LiveDevelopment/Inspector/Inspector.json +++ b/src/LiveDevelopment/Inspector/Inspector.json @@ -28,20 +28,6 @@ { "name": "object", "$ref": "Runtime.RemoteObject" }, { "name": "hints", "type": "object" } ] - }, - { - "name": "didCreateWorker", - "parameters": [ - { "name": "id", "type": "integer" }, - { "name": "url", "type": "string" }, - { "name": "isShared", "type": "boolean" } - ] - }, - { - "name": "didDestroyWorker", - "parameters": [ - { "name": "id", "type": "integer" } - ] } ] }, @@ -364,6 +350,29 @@ "parameters": [ { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } ] + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error.", + "parameters": [ + { "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"}, + { "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"}, + { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} + ], + "hidden": true + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overriden Geolocation Position and Error.", + "hidden": true + }, + { + "name": "canOverrideGeolocation", + "description": "Checks if Geolocation can be overridden.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." } + ], + "hidden": true } ], "events": [ @@ -461,6 +470,7 @@ ], "hidden": true } + ], "commands": [ { @@ -470,7 +480,7 @@ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, - { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.", "hidden": true }, + { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.", "hidden": true }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." } ], "returns": [ @@ -532,6 +542,7 @@ "hidden": true, "description": "Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context." } + ], "events": [ { @@ -585,22 +596,22 @@ "commands": [ { "name": "enable", - "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification." + "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification." }, { "name": "disable", - "description": "Disables console domain, prevents further console messages from being reported to the client." + "description": "Disables console domain, prevents further console messages from being reported to the client." }, { "name": "clearMessages", - "description": "Clears console messages collected in the browser." + "description": "Clears console messages collected in the browser." }, { "name": "setMonitoringXHREnabled", "parameters": [ { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } ], - "description": "Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.", + "description": "Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.", "hidden": true }, { @@ -835,7 +846,7 @@ "parameters": [ { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." } ], - "description": "Toggles ignoring cache for each request. If true, cache will not be used." + "description": "Toggles ignoring cache for each request. If true, cache will not be used." } ], "events": [ @@ -1095,6 +1106,7 @@ "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." }, { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." } ] }, @@ -1415,7 +1427,8 @@ { "name": "name", "type": "string", "description": "The name of the file or directory." }, { "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." }, { "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." }, - { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." } + { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." }, + { "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." } ], "description": "Represents a browser side file or directory." }, @@ -1424,7 +1437,7 @@ "type": "object", "properties": [ { "name": "modificationTime", "type": "number", "description": "Modification time." }, - { "name": "size", "type": "number", "optional": true, "description": "File size. This field is available only for a file." } + { "name": "size", "type": "number", "description": "File size. This field is always zero for directories." } ], "description": "Represents metadata of a file or entry." } @@ -1468,6 +1481,20 @@ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding metadataReceived event should have same requestId with this." } ], "description": "Returns metadata of the entry as metadataReceived event." + }, + { + "name": "requestFileContent", + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the file that the frontend is requesting to read from." }, + { "name": "readAsText", "type": "boolean", "description": "True if the content should be read as text, otherwise the result will be returned as base64 encoded text." }, + { "name": "start", "type": "integer", "optional": true, "description": "Specifies the start of range to read." }, + { "name": "end", "type": "integer", "optional": true, "description": "Specifies the end of range to read exclusively." }, + { "name": "charset", "type": "string", "optional": true, "description": "Overrides charset of the content when content is served as text." } + ], + "returns": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding fileContentReceived event should have same requestId with this." } + ], + "description": "Returns content of the file as fileContentReceived event. Result should be sliced into [start, end)." } ], "events": [ @@ -1492,11 +1519,21 @@ { "name": "metadataReceived", "parameters": [ - { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding getMetadata request." }, + { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding requestMetadata command." }, { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, { "name": "metadata", "$ref": "FileSystem.Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." } ], - "description": "Completion event of getMetadata command." + "description": "Completion event of requestMetadata command." + }, + { + "name": "fileContentReceived", + "parameters": [ + { "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding requestFileContent command." }, + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "content", "type": "string", "optional": true, "description": "Content of the file." }, + { "name": "charset", "type": "string", "optional": true, "description": "Charset of the content if it is served as text." } + ], + "description": "Completion event of requestFileContent command." } ] }, @@ -2045,6 +2082,14 @@ "id": "ShorthandEntry", "type": "object" }, + { + "id": "CSSPropertyInfo", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "Property name." }, + { "name": "longhands", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Longhand property names." } + ] + }, { "id": "CSSComputedStyleProperty", "type": "object", @@ -2078,7 +2123,6 @@ { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." }, { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies true if absent)." }, { "name": "status", "type": "string", "enum": ["active", "inactive", "disabled", "style"], "optional": true, "description": "The property status: \"active\" (implied if absent) if the property is effective in the style, \"inactive\" if the property is overridden by a same-named property in this style later on, \"disabled\" if the property is disabled by the user, \"style\" if the property is reported by the browser rather than by the CSS source parser." }, - { "name": "shorthandName", "type": "string", "optional": true, "description": "The related shorthand property name (absent if this property is not a longhand)." }, { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." } ], "description": "CSS style effective visual dimensions and source offsets." @@ -2114,6 +2158,17 @@ { "name": "totalTime", "type": "number", "description": "Total processing time for all selectors in the profile (in milliseconds.)" }, { "name": "data", "type": "array", "items": { "$ref": "SelectorProfileEntry" }, "description": "CSS selector profile entries." } ] + }, + { + "id": "NamedFlow", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The document node id." }, + { "name": "name", "type": "string", "description": "Named Flow identifier." }, + { "name": "overset", "type": "boolean", "description": "The \"overset\" attribute of a Named Flow." } + ], + "description": "This object represents a Named Flow.", + "hidden": true } ], "commands": [ @@ -2247,7 +2302,7 @@ { "name": "getSupportedCSSProperties", "returns": [ - { "name": "cssProperties", "type": "array", "items": { "type": "string" }, "description": "Supported property names." } + { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSPropertyInfo" }, "description": "Supported property metainfo." } ], "description": "Returns all supported CSS property names." }, @@ -2259,6 +2314,29 @@ "returns": [ { "name": "profile", "$ref": "SelectorProfile" } ] + }, + { + "name": "getNamedFlowCollection", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The document node id for which to get the Named Flow Collection." } + ], + "returns": [ + { "name": "namedFlows", "type": "array", "items": { "type": "string" }, "description": "An array containing the Named Flows in the document." } + ], + "description": "Returns the Named Flows from the document.", + "hidden": true + }, + { + "name": "getFlowByName", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The document node id." }, + { "name": "name", "type": "string", "description": "Named Flow identifier." } + ], + "returns": [ + { "name": "namedFlow", "$ref": "NamedFlow", "description": "A Named Flow." } + ], + "description": "Returns the Named Flow identified by the given name", + "hidden": true } ], "events": [ @@ -2592,8 +2670,8 @@ "name": "runScript", "hidden": true, "parameters": [ - { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, + { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." } ], @@ -2602,6 +2680,14 @@ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." } ], "description": "Runs script with given id in a given context." + }, + { + "name": "setOverlayMessage", + "parameters": [ + { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." } + ], + "hidden": true, + "description": "Sets overlay message." } ], "events": [ @@ -2962,4 +3048,4 @@ ], "events": [] }] -} \ No newline at end of file +} From afb13981e29da0edd5180c288962f13f5ec50ccf Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Tue, 31 Jul 2012 17:21:15 +0200 Subject: [PATCH 11/20] updated documentation --- src/LiveDevelopment/Inspector/inspector.html | 4487 +++++++++--------- 1 file changed, 2320 insertions(+), 2167 deletions(-) diff --git a/src/LiveDevelopment/Inspector/inspector.html b/src/LiveDevelopment/Inspector/inspector.html index 40a1b375304..cd8974ac9e6 100644 --- a/src/LiveDevelopment/Inspector/inspector.html +++ b/src/LiveDevelopment/Inspector/inspector.html @@ -24,10 +24,10 @@ $(_domain).show(); speed = 0; } else { -speed = 'fast'; +speed = "fast"; } -$('html, body').animate({ -scrollTop: symbol.offset().top - 70 + 'px' +$("html, body").animate({ +scrollTop: symbol.offset().top - 70 + "px" }, speed); if (domainAndName.length > 1) symbol.effect("highlight", { color: "#ffc"}, 1000); }); @@ -54,606 +54,614 @@ -
    -
    +
    +

    Table of Contents

    ApplicationCache

    -Type +Type -Command +Command -Event +Event

    CSS

    -Type +Type -Command +Command
      -
    • CSS.enable: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
    • -
    • CSS.disable: Disables the CSS agent for the given page.
    • -
    • CSS.getMatchedStylesForNode: Returns requested styles for a DOM node identified by nodeId.
    • -
    • CSS.getInlineStylesForNode: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
    • -
    • CSS.getComputedStyleForNode: Returns the computed style for a DOM node identified by nodeId.
    • -
    • CSS.getAllStyleSheets: Returns metainfo entries for all known stylesheets.
    • -
    • CSS.getStyleSheet: Returns stylesheet data for the specified styleSheetId.
    • -
    • CSS.getStyleSheetText: Returns the current textual content and the URL for a stylesheet.
    • -
    • CSS.setStyleSheetText: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.
    • -
    • CSS.setPropertyText: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.
    • -
    • CSS.toggleProperty: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.
    • -
    • CSS.setRuleSelector: Modifies the rule selector.
    • -
    • CSS.addRule: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.
    • -
    • CSS.getSupportedCSSProperties: Returns all supported CSS property names.
    • -
    • CSS.startSelectorProfiler
    • -
    • CSS.stopSelectorProfiler
    • +
    • CSS.enable: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
    • +
    • CSS.disable: Disables the CSS agent for the given page.
    • +
    • CSS.getMatchedStylesForNode: Returns requested styles for a DOM node identified by nodeId.
    • +
    • CSS.getInlineStylesForNode: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
    • +
    • CSS.getComputedStyleForNode: Returns the computed style for a DOM node identified by nodeId.
    • +
    • CSS.getAllStyleSheets: Returns metainfo entries for all known stylesheets.
    • +
    • CSS.getStyleSheet: Returns stylesheet data for the specified styleSheetId.
    • +
    • CSS.getStyleSheetText: Returns the current textual content and the URL for a stylesheet.
    • +
    • CSS.setStyleSheetText: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.
    • +
    • CSS.setPropertyText: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.
    • +
    • CSS.toggleProperty: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.
    • +
    • CSS.setRuleSelector: Modifies the rule selector.
    • +
    • CSS.addRule: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.
    • +
    • CSS.getSupportedCSSProperties: Returns all supported CSS property names.
    • +
    • CSS.startSelectorProfiler
    • +
    • CSS.stopSelectorProfiler
    • +
    • CSS.getNamedFlowCollection: Returns the Named Flows from the document.
    • +
    • CSS.getFlowByName: Returns the Named Flow identified by the given name
    -Event +Event
      -
    • CSS.mediaQueryResultChanged: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
    • -
    • CSS.styleSheetChanged: Fired whenever a stylesheet is changed as a result of the client operation.
    • +
    • CSS.mediaQueryResultChanged: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
    • +
    • CSS.styleSheetChanged: Fired whenever a stylesheet is changed as a result of the client operation.

    Console

    -Type +Type -Command +Command -Event +Event

    DOM

    -Type +Type
      -
    • DOM.NodeId: Unique DOM node identifier.
    • -
    • DOM.Node: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • -
    • DOM.EventListener: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • -
    • DOM.RGBA: A structure holding an RGBA color.
    • -
    • DOM.HighlightConfig: Configuration data for the highlighting of page elements.
    • +
    • DOM.NodeId: Unique DOM node identifier.
    • +
    • DOM.Node: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • +
    • DOM.EventListener: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • +
    • DOM.RGBA: A structure holding an RGBA color.
    • +
    • DOM.HighlightConfig: Configuration data for the highlighting of page elements.
    -Command +Command -Event +Event

    DOMDebugger

    -Type +Type -Command +Command

    DOMStorage

    -Type +Type -Command +Command -Event +Event

    Database

    -Type +Type -Command +Command -Event +Event

    Debugger

    -Type +Type -Command +Command -Event +Event

    FileSystem

    -Type +Type -Command +Command -Event +Event

    IndexedDB

    -Type +Type -Command +Command -Event +Event

    Inspector

    -Command +Command -Event +Event

    Memory

    -Type +Type -Command +Command

    Network

    -Type +Type -Command +Command -Event +Event

    Page

    -Type +Type -Command +Command -Event +Event

    Profiler

    -Type +Type -Command +Command -Event +Event

    Runtime

    -Type +Type -Command +Command
      -
    • Runtime.evaluate: Evaluates expression on global object.
    • -
    • Runtime.callFunctionOn: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
    • -
    • Runtime.getProperties: Returns properties of a given object. Object group of the result is inherited from the target object.
    • -
    • Runtime.releaseObject: Releases remote object with given id.
    • -
    • Runtime.releaseObjectGroup: Releases all remote objects that belong to a given group.
    • -
    • Runtime.run: Tells inspected instance(worker or page) that it can run in case it was started paused.
    • -
    • Runtime.setReportExecutionContextCreation: Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.
    • +
    • Runtime.evaluate: Evaluates expression on global object.
    • +
    • Runtime.callFunctionOn: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
    • +
    • Runtime.getProperties: Returns properties of a given object. Object group of the result is inherited from the target object.
    • +
    • Runtime.releaseObject: Releases remote object with given id.
    • +
    • Runtime.releaseObjectGroup: Releases all remote objects that belong to a given group.
    • +
    • Runtime.run: Tells inspected instance(worker or page) that it can run in case it was started paused.
    • +
    • Runtime.setReportExecutionContextCreation: Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.
    -Event +Event

    Timeline

    -Type +Type -Command +Command -Event +Event

    WebGL

    -Command +Command

    Worker

    -Command +Command -Event +Event
    -
    +

    ApplicationCache

    -Type +Type -Command +Command -Event +Event -
    -

    ApplicationCache.ApplicationCacheResource Type

    +
    +

    ApplicationCache.ApplicationCacheResource Type

    Detailed application cache resource information.

    url
    -
    String Resource url.
    +
    String Resource url.
    size
    -
    Integer Resource size.
    +
    Integer Resource size.
    type
    -
    String Resource type.
    +
    String Resource type.
    -
    -

    ApplicationCache.ApplicationCache Type

    +
    +

    ApplicationCache.ApplicationCache Type

    Detailed application cache information.

    manifestURL
    -
    String Manifest URL.
    +
    String Manifest URL.
    size
    -
    Number Application cache size.
    +
    Number Application cache size.
    creationTime
    -
    Number Application cache creation time.
    +
    Number Application cache creation time.
    updateTime
    -
    Number Application cache update time.
    +
    Number Application cache update time.
    resources
    -
    [ApplicationCache.ApplicationCacheResource] Application cache resources.
    +
    [ApplicationCache.ApplicationCacheResource] Application cache resources.
    -
    -

    ApplicationCache.FrameWithManifest Type

    +
    +

    ApplicationCache.FrameWithManifest Type

    Frame identifier - manifest URL pair.

    frameId
    -
    Network.FrameId Frame identifier.
    +
    Network.FrameId Frame identifier.
    manifestURL
    -
    String Manifest URL.
    +
    String Manifest URL.
    status
    -
    Integer Application cache status.
    +
    Integer Application cache status.
    -
    -

    ApplicationCache.getFramesWithManifests Command

    +
    +

    ApplicationCache.getFramesWithManifests Command

    Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.

    Callback Parameters:

    frameIds
    -
    [ApplicationCache.FrameWithManifest] Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
    +
    [ApplicationCache.FrameWithManifest] Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.

    Code Example:

    @@ -663,8 +671,8 @@ 

    Code Example:

    });
    -
    -

    ApplicationCache.enable Command

    +
    +

    ApplicationCache.enable Command

    Enables application cache domain notifications.

    Code Example:

    @@ -672,17 +680,17 @@ 

    Code Example:

    ApplicationCache.enable();
    -
    -

    ApplicationCache.getManifestForFrame Command

    +
    +

    ApplicationCache.getManifestForFrame Command

    Returns manifest URL for document in the given frame.

    frameId
    -
    Network.FrameId Identifier of the frame containing document whose manifest is retrieved.
    +
    Network.FrameId Identifier of the frame containing document whose manifest is retrieved.

    Callback Parameters:

    manifestURL
    -
    String Manifest URL for document in the given frame.
    +
    String Manifest URL for document in the given frame.

    Code Example:

    @@ -692,17 +700,17 @@ 

    Code Example:

    });
    -
    -

    ApplicationCache.getApplicationCacheForFrame Command

    +
    +

    ApplicationCache.getApplicationCacheForFrame Command

    Returns relevant application cache data for the document in given frame.

    frameId
    -
    Network.FrameId Identifier of the frame containing document whose application cache is retrieved.
    +
    Network.FrameId Identifier of the frame containing document whose application cache is retrieved.

    Callback Parameters:

    applicationCache
    -
    ApplicationCache.ApplicationCache Relevant application cache data for the document in given frame.
    +
    ApplicationCache.ApplicationCache Relevant application cache data for the document in given frame.

    Code Example:

    @@ -712,15 +720,15 @@ 

    Code Example:

    });
    -
    -

    ApplicationCache.applicationCacheStatusUpdated Event

    +
    +

    ApplicationCache.applicationCacheStatusUpdated Event

    frameId
    -
    Network.FrameId Identifier of the frame containing document whose application cache updated status.
    +
    Network.FrameId Identifier of the frame containing document whose application cache updated status.
    manifestURL
    -
    String Manifest URL.
    +
    String Manifest URL.
    status
    -
    Integer Updated application cache status.
    +
    Integer Updated application cache status.

    Code Example:

    @@ -730,8 +738,8 @@ 

    Code Example:

    }
    -
    -

    ApplicationCache.networkStateUpdated Event

    +
    +

    ApplicationCache.networkStateUpdated Event

    isNowOnline
    Boolean
    @@ -745,278 +753,301 @@

    Code Example:

    -
    +

    CSS

    This domain exposes CSS read/write operations. All CSS objects, like stylesheets, rules, and styles, have an associated id used in subsequent operations on the related object. Each object type has a specific id structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the get*ForNode() calls (which accept a DOM node id). Alternatively, a client can discover all the existing stylesheets with the getAllStyleSheets() method and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.

    -Type +Type -Command +Command
      -
    • CSS.enable: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
    • -
    • CSS.disable: Disables the CSS agent for the given page.
    • -
    • CSS.getMatchedStylesForNode: Returns requested styles for a DOM node identified by nodeId.
    • -
    • CSS.getInlineStylesForNode: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
    • -
    • CSS.getComputedStyleForNode: Returns the computed style for a DOM node identified by nodeId.
    • -
    • CSS.getAllStyleSheets: Returns metainfo entries for all known stylesheets.
    • -
    • CSS.getStyleSheet: Returns stylesheet data for the specified styleSheetId.
    • -
    • CSS.getStyleSheetText: Returns the current textual content and the URL for a stylesheet.
    • -
    • CSS.setStyleSheetText: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.
    • -
    • CSS.setPropertyText: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.
    • -
    • CSS.toggleProperty: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.
    • -
    • CSS.setRuleSelector: Modifies the rule selector.
    • -
    • CSS.addRule: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.
    • -
    • CSS.getSupportedCSSProperties: Returns all supported CSS property names.
    • -
    • CSS.startSelectorProfiler
    • -
    • CSS.stopSelectorProfiler
    • +
    • CSS.enable: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
    • +
    • CSS.disable: Disables the CSS agent for the given page.
    • +
    • CSS.getMatchedStylesForNode: Returns requested styles for a DOM node identified by nodeId.
    • +
    • CSS.getInlineStylesForNode: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
    • +
    • CSS.getComputedStyleForNode: Returns the computed style for a DOM node identified by nodeId.
    • +
    • CSS.getAllStyleSheets: Returns metainfo entries for all known stylesheets.
    • +
    • CSS.getStyleSheet: Returns stylesheet data for the specified styleSheetId.
    • +
    • CSS.getStyleSheetText: Returns the current textual content and the URL for a stylesheet.
    • +
    • CSS.setStyleSheetText: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.
    • +
    • CSS.setPropertyText: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.
    • +
    • CSS.toggleProperty: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.
    • +
    • CSS.setRuleSelector: Modifies the rule selector.
    • +
    • CSS.addRule: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.
    • +
    • CSS.getSupportedCSSProperties: Returns all supported CSS property names.
    • +
    • CSS.startSelectorProfiler
    • +
    • CSS.stopSelectorProfiler
    • +
    • CSS.getNamedFlowCollection: Returns the Named Flows from the document.
    • +
    • CSS.getFlowByName: Returns the Named Flow identified by the given name
    -Event +Event
      -
    • CSS.mediaQueryResultChanged: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
    • -
    • CSS.styleSheetChanged: Fired whenever a stylesheet is changed as a result of the client operation.
    • +
    • CSS.mediaQueryResultChanged: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
    • +
    • CSS.styleSheetChanged: Fired whenever a stylesheet is changed as a result of the client operation.
    -
    -

    CSS.StyleSheetId Type

    +
    +

    CSS.StyleSheetId Type

    String
    -
    -

    CSS.CSSStyleId Type

    +
    +

    CSS.CSSStyleId Type

    This object identifies a CSS style in a unique way.

    styleSheetId
    -
    CSS.StyleSheetId Enclosing stylesheet identifier.
    +
    CSS.StyleSheetId Enclosing stylesheet identifier.
    ordinal
    -
    Integer The style ordinal within the stylesheet.
    +
    Integer The style ordinal within the stylesheet.
    -
    -

    CSS.StyleSheetOrigin Type

    +
    +

    CSS.StyleSheetOrigin Type

    Stylesheet type: "user" for user stylesheets, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.

    ( user | user-agent | inspector | regular )
    -
    -

    CSS.CSSRuleId Type

    +
    +

    CSS.CSSRuleId Type

    This object identifies a CSS rule in a unique way.

    styleSheetId
    -
    CSS.StyleSheetId Enclosing stylesheet identifier.
    +
    CSS.StyleSheetId Enclosing stylesheet identifier.
    ordinal
    -
    Integer The rule ordinal within the stylesheet.
    +
    Integer The rule ordinal within the stylesheet.
    -
    -

    CSS.PseudoIdRules Type

    +
    +

    CSS.PseudoIdRules Type

    CSS rule collection for a single pseudo style.

    pseudoId
    -
    Integer Pseudo style identifier (see enum PseudoId in RenderStyleConstants.h).
    +
    Integer Pseudo style identifier (see enum PseudoId in RenderStyleConstants.h).
    rules
    -
    [CSS.CSSRule] CSS rules applicable to the pseudo style.
    +
    [CSS.CSSRule] CSS rules applicable to the pseudo style.
    -
    -

    CSS.InheritedStyleEntry Type

    +
    +

    CSS.InheritedStyleEntry Type

    CSS rule collection for a single pseudo style.

    inlineStyle (optional)
    -
    CSS.CSSStyle The ancestor node's inline style, if any, in the style inheritance chain.
    +
    CSS.CSSStyle The ancestor node's inline style, if any, in the style inheritance chain.
    matchedCSSRules
    -
    [CSS.CSSRule] CSS rules matching the ancestor node in the style inheritance chain.
    +
    [CSS.CSSRule] CSS rules matching the ancestor node in the style inheritance chain.
    -
    -

    CSS.CSSStyleAttribute Type

    +
    +

    CSS.CSSStyleAttribute Type

    CSS style information for a DOM style attribute.

    name
    -
    String DOM attribute name (e.g. "width").
    +
    String DOM attribute name (e.g. "width").
    style
    -
    CSS.CSSStyle CSS style generated by the respective DOM attribute.
    +
    CSS.CSSStyle CSS style generated by the respective DOM attribute.
    -
    -

    CSS.CSSStyleSheetHeader Type

    +
    +

    CSS.CSSStyleSheetHeader Type

    CSS stylesheet metainformation.

    styleSheetId
    -
    CSS.StyleSheetId The stylesheet identifier.
    +
    CSS.StyleSheetId The stylesheet identifier.
    frameId
    -
    Network.FrameId Owner frame identifier.
    +
    Network.FrameId Owner frame identifier.
    sourceURL
    -
    String Stylesheet resource URL.
    +
    String Stylesheet resource URL.
    origin
    -
    CSS.StyleSheetOrigin Stylesheet origin.
    +
    CSS.StyleSheetOrigin Stylesheet origin.
    title
    -
    String Stylesheet title.
    +
    String Stylesheet title.
    disabled
    -
    Boolean Denotes whether the stylesheet is disabled.
    +
    Boolean Denotes whether the stylesheet is disabled.
    -
    -

    CSS.CSSStyleSheetBody Type

    +
    +

    CSS.CSSStyleSheetBody Type

    CSS stylesheet contents.

    styleSheetId
    -
    CSS.StyleSheetId The stylesheet identifier.
    +
    CSS.StyleSheetId The stylesheet identifier.
    rules
    -
    [CSS.CSSRule] Stylesheet resource URL.
    +
    [CSS.CSSRule] Stylesheet resource URL.
    text (optional)
    -
    String Stylesheet resource contents (if available).
    +
    String Stylesheet resource contents (if available).
    -
    -

    CSS.CSSRule Type

    +
    +

    CSS.CSSRule Type

    CSS rule representation.

    ruleId (optional)
    -
    CSS.CSSRuleId The CSS rule identifier (absent for user agent stylesheet and user-specified stylesheet rules).
    +
    CSS.CSSRuleId The CSS rule identifier (absent for user agent stylesheet and user-specified stylesheet rules).
    selectorText
    -
    String Rule selector.
    +
    String Rule selector.
    sourceURL (optional)
    -
    String Parent stylesheet resource URL (for regular rules).
    +
    String Parent stylesheet resource URL (for regular rules).
    sourceLine
    -
    Integer Line ordinal of the rule selector start character in the resource.
    +
    Integer Line ordinal of the rule selector start character in the resource.
    origin
    -
    CSS.StyleSheetOrigin Parent stylesheet's origin.
    +
    CSS.StyleSheetOrigin Parent stylesheet's origin.
    style
    -
    CSS.CSSStyle Associated style declaration.
    +
    CSS.CSSStyle Associated style declaration.
    selectorRange (optional)
    -
    CSS.SourceRange The rule selector range in the underlying resource (if available).
    +
    CSS.SourceRange The rule selector range in the underlying resource (if available).
    media (optional)
    -
    [CSS.CSSMedia] Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
    +
    [CSS.CSSMedia] Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
    -
    -

    CSS.SourceRange Type

    +
    +

    CSS.SourceRange Type

    Text range within a resource.

    start
    -
    Integer Start of range (inclusive).
    +
    Integer Start of range (inclusive).
    end
    -
    Integer End of range (exclusive).
    +
    Integer End of range (exclusive).
    -
    -

    CSS.ShorthandEntry Type

    +
    +

    CSS.ShorthandEntry Type

    -
    -

    CSS.CSSComputedStyleProperty Type

    +
    +

    CSS.CSSPropertyInfo Type

    name
    -
    String Computed style property name.
    +
    String Property name.
    +
    longhands (optional)
    +
    [String] Longhand property names.
    +
    +
    +
    +

    CSS.CSSComputedStyleProperty Type

    +
    +
    name
    +
    String Computed style property name.
    value
    -
    String Computed style property value.
    +
    String Computed style property value.
    -
    -

    CSS.CSSStyle Type

    +
    +

    CSS.CSSStyle Type

    CSS style representation.

    styleId (optional)
    -
    CSS.CSSStyleId The CSS style identifier (absent for attribute styles).
    +
    CSS.CSSStyleId The CSS style identifier (absent for attribute styles).
    cssProperties
    -
    [CSS.CSSProperty] CSS properties in the style.
    +
    [CSS.CSSProperty] CSS properties in the style.
    shorthandEntries
    -
    [CSS.ShorthandEntry] Computed values for all shorthands found in the style.
    +
    [CSS.ShorthandEntry] Computed values for all shorthands found in the style.
    cssText (optional)
    -
    String Style declaration text (if available).
    +
    String Style declaration text (if available).
    range (optional)
    -
    CSS.SourceRange Style declaration range in the enclosing stylesheet (if available).
    +
    CSS.SourceRange Style declaration range in the enclosing stylesheet (if available).
    width (optional)
    -
    String The effective "width" property value from this style.
    +
    String The effective "width" property value from this style.
    height (optional)
    -
    String The effective "height" property value from this style.
    +
    String The effective "height" property value from this style.
    -
    -

    CSS.CSSProperty Type

    +
    +

    CSS.CSSProperty Type

    CSS style effective visual dimensions and source offsets.

    name
    -
    String The property name.
    +
    String The property name.
    value
    -
    String The property value.
    +
    String The property value.
    priority (optional)
    -
    String The property priority (implies "" if absent).
    +
    String The property priority (implies "" if absent).
    implicit (optional)
    -
    Boolean Whether the property is implicit (implies false if absent).
    +
    Boolean Whether the property is implicit (implies false if absent).
    text (optional)
    -
    String The full property text as specified in the style.
    +
    String The full property text as specified in the style.
    parsedOk (optional)
    -
    Boolean Whether the property is understood by the browser (implies true if absent).
    +
    Boolean Whether the property is understood by the browser (implies true if absent).
    status (optional)
    -
    ( active | inactive | disabled | style ) The property status: "active" (implied if absent) if the property is effective in the style, "inactive" if the property is overridden by a same-named property in this style later on, "disabled" if the property is disabled by the user, "style" if the property is reported by the browser rather than by the CSS source parser.
    -
    shorthandName (optional)
    -
    String The related shorthand property name (absent if this property is not a longhand).
    +
    ( active | inactive | disabled | style ) The property status: "active" (implied if absent) if the property is effective in the style, "inactive" if the property is overridden by a same-named property in this style later on, "disabled" if the property is disabled by the user, "style" if the property is reported by the browser rather than by the CSS source parser.
    range (optional)
    -
    CSS.SourceRange The entire property range in the enclosing style declaration (if available).
    +
    CSS.SourceRange The entire property range in the enclosing style declaration (if available).
    -
    -

    CSS.CSSMedia Type

    +
    +

    CSS.CSSMedia Type

    CSS media query descriptor.

    text
    -
    String Media query text.
    +
    String Media query text.
    source
    -
    ( mediaRule | importRule | linkedSheet | inlineSheet ) Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
    +
    ( mediaRule | importRule | linkedSheet | inlineSheet ) Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
    sourceURL (optional)
    -
    String URL of the document containing the media query description.
    +
    String URL of the document containing the media query description.
    sourceLine (optional)
    -
    Integer Line in the document containing the media query (not defined for the "stylesheet" source).
    +
    Integer Line in the document containing the media query (not defined for the "stylesheet" source).
    -
    -

    CSS.SelectorProfileEntry Type

    +
    +

    CSS.SelectorProfileEntry Type

    CSS selector profile entry.

    selector
    -
    String CSS selector of the corresponding rule.
    +
    String CSS selector of the corresponding rule.
    url
    -
    String URL of the resource containing the corresponding rule.
    +
    String URL of the resource containing the corresponding rule.
    lineNumber
    -
    Integer Selector line number in the resource for the corresponding rule.
    +
    Integer Selector line number in the resource for the corresponding rule.
    time
    -
    Number Total time this rule handling contributed to the browser running time during profiling (in milliseconds.)
    +
    Number Total time this rule handling contributed to the browser running time during profiling (in milliseconds.)
    hitCount
    -
    Integer Number of times this rule was considered a candidate for matching against DOM elements.
    +
    Integer Number of times this rule was considered a candidate for matching against DOM elements.
    matchCount
    -
    Integer Number of times this rule actually matched a DOM element.
    +
    Integer Number of times this rule actually matched a DOM element.
    -
    -

    CSS.SelectorProfile Type

    +
    +

    CSS.SelectorProfile Type

    totalTime
    -
    Number Total processing time for all selectors in the profile (in milliseconds.)
    +
    Number Total processing time for all selectors in the profile (in milliseconds.)
    data
    -
    [CSS.SelectorProfileEntry] CSS selector profile entries.
    +
    [CSS.SelectorProfileEntry] CSS selector profile entries.
    +
    +
    +
    +

    CSS.NamedFlow Type

    +

    This object represents a Named Flow.

    +
    +
    nodeId
    +
    DOM.NodeId The document node id.
    +
    name
    +
    String Named Flow identifier.
    +
    overset
    +
    Boolean The "overset" attribute of a Named Flow.
    -
    -

    CSS.enable Command

    +
    +

    CSS.enable Command

    Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.

    Code Example:

    @@ -1024,8 +1055,8 @@ 

    Code Example:

    CSS.enable();
    -
    -

    CSS.disable Command

    +
    +

    CSS.disable Command

    Disables the CSS agent for the given page.

    Code Example:

    @@ -1033,27 +1064,27 @@ 

    Code Example:

    CSS.disable();
    -
    -

    CSS.getMatchedStylesForNode Command

    +
    +

    CSS.getMatchedStylesForNode Command

    Returns requested styles for a DOM node identified by nodeId.

    nodeId
    -
    DOM.NodeId
    +
    DOM.NodeId
    forcedPseudoClasses (optional)
    -
    [( active | focus | hover | visited )] Element pseudo classes to force when computing applicable style rules.
    +
    [( active | focus | hover | visited )] Element pseudo classes to force when computing applicable style rules.
    includePseudo (optional)
    -
    Boolean Whether to include pseudo styles (default: true).
    +
    Boolean Whether to include pseudo styles (default: true).
    includeInherited (optional)
    -
    Boolean Whether to include inherited styles (default: true).
    +
    Boolean Whether to include inherited styles (default: true).

    Callback Parameters:

    matchedCSSRules (optional)
    -
    [CSS.CSSRule] CSS rules matching this node, from all applicable stylesheets.
    +
    [CSS.CSSRule] CSS rules matching this node, from all applicable stylesheets.
    pseudoElements (optional)
    -
    [CSS.PseudoIdRules] Pseudo style rules for this node.
    +
    [CSS.PseudoIdRules] Pseudo style rules for this node.
    inherited (optional)
    -
    [CSS.InheritedStyleEntry] A chain of inherited styles (from the immediate node parent up to the DOM tree root).
    +
    [CSS.InheritedStyleEntry] A chain of inherited styles (from the immediate node parent up to the DOM tree root).

    Code Example:

    @@ -1063,19 +1094,19 @@ 

    Code Example:

    });
    -
    -

    CSS.getInlineStylesForNode Command

    +
    +

    CSS.getInlineStylesForNode Command

    Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.

    nodeId
    -
    DOM.NodeId
    +
    DOM.NodeId

    Callback Parameters:

    inlineStyle (optional)
    -
    CSS.CSSStyle Inline style for the specified DOM node.
    +
    CSS.CSSStyle Inline style for the specified DOM node.
    attributesStyle (optional)
    -
    CSS.CSSStyle Attribute-defined element style (e.g. resulting from "width=20 height=100%").
    +
    CSS.CSSStyle Attribute-defined element style (e.g. resulting from "width=20 height=100%").

    Code Example:

    @@ -1085,19 +1116,19 @@ 

    Code Example:

    });
    -
    -

    CSS.getComputedStyleForNode Command

    +
    +

    CSS.getComputedStyleForNode Command

    Returns the computed style for a DOM node identified by nodeId.

    nodeId
    -
    DOM.NodeId
    +
    DOM.NodeId
    forcedPseudoClasses (optional)
    -
    [( active | focus | hover | visited )] Element pseudo classes to force when computing applicable style rules.
    +
    [( active | focus | hover | visited )] Element pseudo classes to force when computing applicable style rules.

    Callback Parameters:

    computedStyle
    -
    [CSS.CSSComputedStyleProperty] Computed style for the specified DOM node.
    +
    [CSS.CSSComputedStyleProperty] Computed style for the specified DOM node.

    Code Example:

    @@ -1107,13 +1138,13 @@ 

    Code Example:

    });
    -
    -

    CSS.getAllStyleSheets Command

    +
    +

    CSS.getAllStyleSheets Command

    Returns metainfo entries for all known stylesheets.

    Callback Parameters:

    headers
    -
    [CSS.CSSStyleSheetHeader] Descriptor entries for all available stylesheets.
    +
    [CSS.CSSStyleSheetHeader] Descriptor entries for all available stylesheets.

    Code Example:

    @@ -1123,17 +1154,17 @@ 

    Code Example:

    });
    -
    -

    CSS.getStyleSheet Command

    +
    +

    CSS.getStyleSheet Command

    Returns stylesheet data for the specified styleSheetId.

    styleSheetId
    -
    CSS.StyleSheetId
    +
    CSS.StyleSheetId

    Callback Parameters:

    styleSheet
    -
    CSS.CSSStyleSheetBody Stylesheet contents for the specified styleSheetId.
    +
    CSS.CSSStyleSheetBody Stylesheet contents for the specified styleSheetId.

    Code Example:

    @@ -1143,17 +1174,17 @@ 

    Code Example:

    });
    -
    -

    CSS.getStyleSheetText Command

    +
    +

    CSS.getStyleSheetText Command

    Returns the current textual content and the URL for a stylesheet.

    styleSheetId
    -
    CSS.StyleSheetId
    +
    CSS.StyleSheetId

    Callback Parameters:

    text
    -
    String The stylesheet text.
    +
    String The stylesheet text.

    Code Example:

    @@ -1163,12 +1194,12 @@ 

    Code Example:

    });
    -
    -

    CSS.setStyleSheetText Command

    +
    +

    CSS.setStyleSheetText Command

    Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.

    styleSheetId
    -
    CSS.StyleSheetId
    +
    CSS.StyleSheetId
    text
    String
    @@ -1178,12 +1209,12 @@

    Code Example:

    CSS.setStyleSheetText(styleSheetId, text);
    -
    -

    CSS.setPropertyText Command

    +
    +

    CSS.setPropertyText Command

    Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.

    styleId
    -
    CSS.CSSStyleId
    +
    CSS.CSSStyleId
    propertyIndex
    Integer
    text
    @@ -1194,7 +1225,7 @@

    CSS.setPropertyText Command

    Callback Parameters:

    style
    -
    CSS.CSSStyle The resulting style after the property text modification.
    +
    CSS.CSSStyle The resulting style after the property text modification.

    Code Example:

    @@ -1204,12 +1235,12 @@ 

    Code Example:

    });
    -
    -

    CSS.toggleProperty Command

    +
    +

    CSS.toggleProperty Command

    Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.

    styleId
    -
    CSS.CSSStyleId
    +
    CSS.CSSStyleId
    propertyIndex
    Integer
    disable
    @@ -1218,7 +1249,7 @@

    CSS.toggleProperty Command

    Callback Parameters:

    style
    -
    CSS.CSSStyle The resulting style after the property toggling.
    +
    CSS.CSSStyle The resulting style after the property toggling.

    Code Example:

    @@ -1228,19 +1259,19 @@ 

    Code Example:

    });
    -
    -

    CSS.setRuleSelector Command

    +
    +

    CSS.setRuleSelector Command

    Modifies the rule selector.

    ruleId
    -
    CSS.CSSRuleId
    +
    CSS.CSSRuleId
    selector
    String

    Callback Parameters:

    rule
    -
    CSS.CSSRule The resulting rule after the selector modification.
    +
    CSS.CSSRule The resulting rule after the selector modification.

    Code Example:

    @@ -1250,19 +1281,19 @@ 

    Code Example:

    });
    -
    -

    CSS.addRule Command

    +
    +

    CSS.addRule Command

    Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.

    contextNodeId
    -
    DOM.NodeId
    +
    DOM.NodeId
    selector
    String

    Callback Parameters:

    rule
    -
    CSS.CSSRule The newly created rule.
    +
    CSS.CSSRule The newly created rule.

    Code Example:

    @@ -1272,13 +1303,13 @@ 

    Code Example:

    });
    -
    -

    CSS.getSupportedCSSProperties Command

    +
    +

    CSS.getSupportedCSSProperties Command

    Returns all supported CSS property names.

    Callback Parameters:

    cssProperties
    -
    [String] Supported property names.
    +
    [CSS.CSSPropertyInfo] Supported property metainfo.

    Code Example:

    @@ -1288,20 +1319,20 @@ 

    Code Example:

    });
    -
    -

    CSS.startSelectorProfiler Command

    +
    +

    CSS.startSelectorProfiler Command

    Code Example:

     // WebInspector Command: CSS.startSelectorProfiler
     CSS.startSelectorProfiler();
     
    -
    -

    CSS.stopSelectorProfiler Command

    +
    +

    CSS.stopSelectorProfiler Command

    Callback Parameters:

    profile
    -
    CSS.SelectorProfile
    +
    CSS.SelectorProfile

    Code Example:

    @@ -1311,8 +1342,50 @@ 

    Code Example:

    });
    -
    -

    CSS.mediaQueryResultChanged Event

    +
    +

    CSS.getNamedFlowCollection Command

    +

    Returns the Named Flows from the document.

    +
    +
    nodeId
    +
    DOM.NodeId The document node id for which to get the Named Flow Collection.
    +
    +

    Callback Parameters:

    +
    +
    namedFlows
    +
    [String] An array containing the Named Flows in the document.
    +
    +

    Code Example:

    +
    +// WebInspector Command: CSS.getNamedFlowCollection
    +CSS.getNamedFlowCollection(nodeId, function callback(res) {
    +	// res = {namedFlows}
    +});
    +
    +
    +
    +

    CSS.getFlowByName Command

    +

    Returns the Named Flow identified by the given name

    +
    +
    nodeId
    +
    DOM.NodeId The document node id.
    +
    name
    +
    String Named Flow identifier.
    +
    +

    Callback Parameters:

    +
    +
    namedFlow
    +
    CSS.NamedFlow A Named Flow.
    +
    +

    Code Example:

    +
    +// WebInspector Command: CSS.getFlowByName
    +CSS.getFlowByName(nodeId, name, function callback(res) {
    +	// res = {namedFlow}
    +});
    +
    +
    +
    +

    CSS.mediaQueryResultChanged Event

    Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.

    Code Example:

    @@ -1322,12 +1395,12 @@ 

    Code Example:

    }
    -
    -

    CSS.styleSheetChanged Event

    +
    +

    CSS.styleSheetChanged Event

    Fired whenever a stylesheet is changed as a result of the client operation.

    styleSheetId
    -
    CSS.StyleSheetId
    +
    CSS.StyleSheetId

    Code Example:

    @@ -1338,79 +1411,79 @@ 

    Code Example:

    -
    +

    Console

    Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the JavaScript Console API. One needs to enable this domain using enable command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using messageAdded notification upon enabling.

    -Type +Type -Command +Command -Event +Event -
    -

    Console.ConsoleMessage Type

    +
    +

    Console.ConsoleMessage Type

    Console message.

    source
    -
    ( html | wml | xml | javascript | network | console-api | other ) Message source.
    +
    ( html | wml | xml | javascript | network | console-api | other ) Message source.
    level
    -
    ( tip | log | warning | error | debug ) Message severity.
    +
    ( tip | log | warning | error | debug ) Message severity.
    text
    -
    String Message text.
    +
    String Message text.
    type (optional)
    -
    ( log | dir | dirxml | trace | startGroup | startGroupCollapsed | endGroup | assert ) Console message type.
    +
    ( log | dir | dirxml | trace | startGroup | startGroupCollapsed | endGroup | assert ) Console message type.
    url (optional)
    -
    String URL of the message origin.
    +
    String URL of the message origin.
    line (optional)
    -
    Integer Line number in the resource that generated this message.
    +
    Integer Line number in the resource that generated this message.
    repeatCount (optional)
    -
    Integer Repeat count for repeated messages.
    +
    Integer Repeat count for repeated messages.
    parameters (optional)
    -
    [Runtime.RemoteObject] Message parameters in case of the formatted message.
    +
    [Runtime.RemoteObject] Message parameters in case of the formatted message.
    stackTrace (optional)
    -
    Console.StackTrace JavaScript stack trace for assertions and error messages.
    +
    Console.StackTrace JavaScript stack trace for assertions and error messages.
    networkRequestId (optional)
    -
    Network.RequestId Identifier of the network request associated with this message.
    +
    Network.RequestId Identifier of the network request associated with this message.
    -
    -

    Console.CallFrame Type

    +
    +

    Console.CallFrame Type

    Stack entry for console errors and assertions.

    functionName
    -
    String JavaScript function name.
    +
    String JavaScript function name.
    url
    -
    String JavaScript script name or url.
    +
    String JavaScript script name or url.
    lineNumber
    -
    Integer JavaScript script line number.
    +
    Integer JavaScript script line number.
    columnNumber
    -
    Integer JavaScript script column number.
    +
    Integer JavaScript script column number.
    -
    -

    Console.StackTrace Type

    +
    +

    Console.StackTrace Type

    Call frames for assertions or error messages.

    -
    [Console.CallFrame]
    +
    [Console.CallFrame]
    -
    -

    Console.enable Command

    +
    +

    Console.enable Command

    Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.

    Code Example:

    @@ -1418,8 +1491,8 @@ 

    Code Example:

    Console.enable();
    -
    -

    Console.disable Command

    +
    +

    Console.disable Command

    Disables console domain, prevents further console messages from being reported to the client.

    Code Example:

    @@ -1427,8 +1500,8 @@ 

    Code Example:

    Console.disable();
    -
    -

    Console.clearMessages Command

    +
    +

    Console.clearMessages Command

    Clears console messages collected in the browser.

    Code Example:

    @@ -1436,12 +1509,12 @@ 

    Code Example:

    Console.clearMessages();
    -
    -

    Console.setMonitoringXHREnabled Command

    +
    +

    Console.setMonitoringXHREnabled Command

    Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.

    enabled
    -
    Boolean Monitoring enabled state.
    +
    Boolean Monitoring enabled state.

    Code Example:

    @@ -1449,12 +1522,12 @@ 

    Code Example:

    Console.setMonitoringXHREnabled(enabled);
    -
    -

    Console.addInspectedNode Command

    +
    +

    Console.addInspectedNode Command

    Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

    nodeId
    -
    DOM.NodeId DOM node id to be accessible by means of $x command line API.
    +
    DOM.NodeId DOM node id to be accessible by means of $x command line API.

    Code Example:

    @@ -1462,8 +1535,8 @@ 

    Code Example:

    Console.addInspectedNode(nodeId);
    -
    -

    Console.addInspectedHeapObject Command

    +
    +

    Console.addInspectedHeapObject Command

    heapObjectId
    Integer
    @@ -1474,12 +1547,12 @@

    Code Example:

    Console.addInspectedHeapObject(heapObjectId);
    -
    -

    Console.messageAdded Event

    +
    +

    Console.messageAdded Event

    Issued when new console message is added.

    message
    -
    Console.ConsoleMessage Console message that has been added.
    +
    Console.ConsoleMessage Console message that has been added.

    Code Example:

    @@ -1489,12 +1562,12 @@ 

    Code Example:

    }
    -
    -

    Console.messageRepeatCountUpdated Event

    +
    +

    Console.messageRepeatCountUpdated Event

    Issued when subsequent message(s) are equal to the previous one(s).

    count
    -
    Integer New repeat count value.
    +
    Integer New repeat count value.

    Code Example:

    @@ -1504,8 +1577,8 @@ 

    Code Example:

    }
    -
    -

    Console.messagesCleared Event

    +
    +

    Console.messagesCleared Event

    Issued when console is cleared. This happens either upon clearMessages command or after page navigation.

    Code Example:

    @@ -1516,166 +1589,166 @@ 

    Code Example:

    -
    +

    DOM

    This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an id. This id can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.

    Note that iframe owner elements will return corresponding document elements as their child nodes.

    -Type +Type
      -
    • DOM.NodeId: Unique DOM node identifier.
    • -
    • DOM.Node: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • -
    • DOM.EventListener: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • -
    • DOM.RGBA: A structure holding an RGBA color.
    • -
    • DOM.HighlightConfig: Configuration data for the highlighting of page elements.
    • +
    • DOM.NodeId: Unique DOM node identifier.
    • +
    • DOM.Node: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • +
    • DOM.EventListener: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
    • +
    • DOM.RGBA: A structure holding an RGBA color.
    • +
    • DOM.HighlightConfig: Configuration data for the highlighting of page elements.
    -Command +Command -Event +Event -
    -

    DOM.NodeId Type

    +
    +

    DOM.NodeId Type

    Unique DOM node identifier.

    Integer
    -
    -

    DOM.Node Type

    +
    +

    DOM.Node Type

    DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

    nodeId
    -
    DOM.NodeId Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
    +
    DOM.NodeId Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
    nodeType
    -
    Integer Node's nodeType.
    +
    Integer Node's nodeType.
    nodeName
    -
    String Node's nodeName.
    +
    String Node's nodeName.
    localName
    -
    String Node's localName.
    +
    String Node's localName.
    nodeValue
    -
    String Node's nodeValue.
    +
    String Node's nodeValue.
    childNodeCount (optional)
    -
    Integer Child count for Container nodes.
    +
    Integer Child count for Container nodes.
    children (optional)
    -
    [DOM.Node] Child nodes of this node when requested with children.
    +
    [DOM.Node] Child nodes of this node when requested with children.
    attributes (optional)
    -
    [String] Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
    +
    [String] Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
    documentURL (optional)
    -
    String Document URL that Document or FrameOwner node points to.
    +
    String Document URL that Document or FrameOwner node points to.
    publicId (optional)
    -
    String DocumentType's publicId.
    +
    String DocumentType's publicId.
    systemId (optional)
    -
    String DocumentType's systemId.
    +
    String DocumentType's systemId.
    internalSubset (optional)
    -
    String DocumentType's internalSubset.
    +
    String DocumentType's internalSubset.
    xmlVersion (optional)
    -
    String Document's XML version in case of XML documents.
    +
    String Document's XML version in case of XML documents.
    name (optional)
    -
    String Attr's name.
    +
    String Attr's name.
    value (optional)
    -
    String Attr's value.
    +
    String Attr's value.
    contentDocument (optional)
    -
    DOM.Node Content document for frame owner elements.
    +
    DOM.Node Content document for frame owner elements.
    shadowRoots (optional)
    -
    [DOM.Node] Shadow root list for given element host.
    +
    [DOM.Node] Shadow root list for given element host.
    -
    -

    DOM.EventListener Type

    +
    +

    DOM.EventListener Type

    DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

    type
    -
    String EventListener's type.
    +
    String EventListener's type.
    useCapture
    -
    Boolean EventListener's useCapture.
    +
    Boolean EventListener's useCapture.
    isAttribute
    -
    Boolean EventListener's isAttribute.
    +
    Boolean EventListener's isAttribute.
    nodeId
    -
    DOM.NodeId Target DOMNode id.
    +
    DOM.NodeId Target DOMNode id.
    handlerBody
    -
    String Event handler function body.
    +
    String Event handler function body.
    location (optional)
    -
    Debugger.Location Handler code location.
    +
    Debugger.Location Handler code location.
    -
    -

    DOM.RGBA Type

    +
    +

    DOM.RGBA Type

    A structure holding an RGBA color.

    r
    -
    Integer The red component, in the [0-255] range.
    +
    Integer The red component, in the [0-255] range.
    g
    -
    Integer The green component, in the [0-255] range.
    +
    Integer The green component, in the [0-255] range.
    b
    -
    Integer The blue component, in the [0-255] range.
    +
    Integer The blue component, in the [0-255] range.
    a (optional)
    -
    Number The alpha component, in the [0-1] range (default: 1).
    +
    Number The alpha component, in the [0-1] range (default: 1).
    -
    -

    DOM.HighlightConfig Type

    +
    +

    DOM.HighlightConfig Type

    Configuration data for the highlighting of page elements.

    showInfo (optional)
    -
    Boolean Whether the node info tooltip should be shown (default: false).
    +
    Boolean Whether the node info tooltip should be shown (default: false).
    contentColor (optional)
    -
    DOM.RGBA The content box highlight fill color (default: transparent).
    +
    DOM.RGBA The content box highlight fill color (default: transparent).
    paddingColor (optional)
    -
    DOM.RGBA The padding highlight fill color (default: transparent).
    +
    DOM.RGBA The padding highlight fill color (default: transparent).
    borderColor (optional)
    -
    DOM.RGBA The border highlight fill color (default: transparent).
    +
    DOM.RGBA The border highlight fill color (default: transparent).
    marginColor (optional)
    -
    DOM.RGBA The margin highlight fill color (default: transparent).
    +
    DOM.RGBA The margin highlight fill color (default: transparent).
    -
    -

    DOM.getDocument Command

    +
    +

    DOM.getDocument Command

    Returns the root DOM node to the caller.

    Callback Parameters:

    root
    -
    DOM.Node Resulting node.
    +
    DOM.Node Resulting node.

    Code Example:

    @@ -1685,12 +1758,12 @@ 

    Code Example:

    });
    -
    -

    DOM.requestChildNodes Command

    +
    +

    DOM.requestChildNodes Command

    Requests that children of the node with given id are returned to the caller in form of setChildNodes events.

    nodeId
    -
    DOM.NodeId Id of the node to get children for.
    +
    DOM.NodeId Id of the node to get children for.

    Code Example:

    @@ -1698,19 +1771,19 @@ 

    Code Example:

    DOM.requestChildNodes(nodeId);
    -
    -

    DOM.querySelector Command

    +
    +

    DOM.querySelector Command

    Executes querySelector on a given node.

    nodeId
    -
    DOM.NodeId Id of the node to query upon.
    +
    DOM.NodeId Id of the node to query upon.
    selector
    -
    String Selector string.
    +
    String Selector string.

    Callback Parameters:

    nodeId
    -
    DOM.NodeId Query selector result.
    +
    DOM.NodeId Query selector result.

    Code Example:

    @@ -1720,19 +1793,19 @@ 

    Code Example:

    });
    -
    -

    DOM.querySelectorAll Command

    +
    +

    DOM.querySelectorAll Command

    Executes querySelectorAll on a given node.

    nodeId
    -
    DOM.NodeId Id of the node to query upon.
    +
    DOM.NodeId Id of the node to query upon.
    selector
    -
    String Selector string.
    +
    String Selector string.

    Callback Parameters:

    nodeIds
    -
    [DOM.NodeId] Query selector result.
    +
    [DOM.NodeId] Query selector result.

    Code Example:

    @@ -1742,19 +1815,19 @@ 

    Code Example:

    });
    -
    -

    DOM.setNodeName Command

    +
    +

    DOM.setNodeName Command

    Sets node name for a node with given id.

    nodeId
    -
    DOM.NodeId Id of the node to set name for.
    +
    DOM.NodeId Id of the node to set name for.
    name
    -
    String New node's name.
    +
    String New node's name.

    Callback Parameters:

    nodeId
    -
    DOM.NodeId New node's id.
    +
    DOM.NodeId New node's id.

    Code Example:

    @@ -1764,14 +1837,14 @@ 

    Code Example:

    });
    -
    -

    DOM.setNodeValue Command

    +
    +

    DOM.setNodeValue Command

    Sets node value for a node with given id.

    nodeId
    -
    DOM.NodeId Id of the node to set value for.
    +
    DOM.NodeId Id of the node to set value for.
    value
    -
    String New node's value.
    +
    String New node's value.

    Code Example:

    @@ -1779,12 +1852,12 @@ 

    Code Example:

    DOM.setNodeValue(nodeId, value);
    -
    -

    DOM.removeNode Command

    +
    +

    DOM.removeNode Command

    Removes node with given id.

    nodeId
    -
    DOM.NodeId Id of the node to remove.
    +
    DOM.NodeId Id of the node to remove.

    Code Example:

    @@ -1792,16 +1865,16 @@ 

    Code Example:

    DOM.removeNode(nodeId);
    -
    -

    DOM.setAttributeValue Command

    +
    +

    DOM.setAttributeValue Command

    Sets attribute for an element with given id.

    nodeId
    -
    DOM.NodeId Id of the element to set attribute for.
    +
    DOM.NodeId Id of the element to set attribute for.
    name
    -
    String Attribute name.
    +
    String Attribute name.
    value
    -
    String Attribute value.
    +
    String Attribute value.

    Code Example:

    @@ -1809,16 +1882,16 @@ 

    Code Example:

    DOM.setAttributeValue(nodeId, name, value);
    -
    -

    DOM.setAttributesAsText Command

    +
    +

    DOM.setAttributesAsText Command

    Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.

    nodeId
    -
    DOM.NodeId Id of the element to set attributes for.
    +
    DOM.NodeId Id of the element to set attributes for.
    text
    -
    String Text with a number of attributes. Will parse this text using HTML parser.
    +
    String Text with a number of attributes. Will parse this text using HTML parser.
    name (optional)
    -
    String Attribute name to replace with new attributes derived from text in case text parsed successfully.
    +
    String Attribute name to replace with new attributes derived from text in case text parsed successfully.

    Code Example:

    @@ -1826,14 +1899,14 @@ 

    Code Example:

    DOM.setAttributesAsText(nodeId, text, name);
    -
    -

    DOM.removeAttribute Command

    +
    +

    DOM.removeAttribute Command

    Removes attribute with given name from an element with given id.

    nodeId
    -
    DOM.NodeId Id of the element to remove attribute from.
    +
    DOM.NodeId Id of the element to remove attribute from.
    name
    -
    String Name of the attribute to remove.
    +
    String Name of the attribute to remove.

    Code Example:

    @@ -1841,17 +1914,17 @@ 

    Code Example:

    DOM.removeAttribute(nodeId, name);
    -
    -

    DOM.getEventListenersForNode Command

    +
    +

    DOM.getEventListenersForNode Command

    Returns event listeners relevant to the node.

    nodeId
    -
    DOM.NodeId Id of the node to get listeners for.
    +
    DOM.NodeId Id of the node to get listeners for.

    Callback Parameters:

    listeners
    -
    [DOM.EventListener] Array of relevant listeners.
    +
    [DOM.EventListener] Array of relevant listeners.

    Code Example:

    @@ -1861,17 +1934,17 @@ 

    Code Example:

    });
    -
    -

    DOM.getOuterHTML Command

    +
    +

    DOM.getOuterHTML Command

    Returns node's HTML markup.

    nodeId
    -
    DOM.NodeId Id of the node to get markup for.
    +
    DOM.NodeId Id of the node to get markup for.

    Callback Parameters:

    outerHTML
    -
    String Outer HTML markup.
    +
    String Outer HTML markup.

    Code Example:

    @@ -1881,14 +1954,14 @@ 

    Code Example:

    });
    -
    -

    DOM.setOuterHTML Command

    +
    +

    DOM.setOuterHTML Command

    Sets node HTML markup, returns new node id.

    nodeId
    -
    DOM.NodeId Id of the node to set markup for.
    +
    DOM.NodeId Id of the node to set markup for.
    outerHTML
    -
    String Outer HTML markup to set.
    +
    String Outer HTML markup to set.

    Code Example:

    @@ -1896,19 +1969,19 @@ 

    Code Example:

    DOM.setOuterHTML(nodeId, outerHTML);
    -
    -

    DOM.performSearch Command

    +
    +

    DOM.performSearch Command

    Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.

    query
    -
    String Plain text or query selector or XPath search query.
    +
    String Plain text or query selector or XPath search query.

    Callback Parameters:

    searchId
    -
    String Unique search session identifier.
    +
    String Unique search session identifier.
    resultCount
    -
    Integer Number of search results.
    +
    Integer Number of search results.

    Code Example:

    @@ -1918,21 +1991,21 @@ 

    Code Example:

    });
    -
    -

    DOM.getSearchResults Command

    +
    +

    DOM.getSearchResults Command

    Returns search results from given fromIndex to given toIndex from the sarch with the given identifier.

    searchId
    -
    String Unique search session identifier.
    +
    String Unique search session identifier.
    fromIndex
    -
    Integer Start index of the search result to be returned.
    +
    Integer Start index of the search result to be returned.
    toIndex
    -
    Integer End index of the search result to be returned.
    +
    Integer End index of the search result to be returned.

    Callback Parameters:

    nodeIds
    -
    [DOM.NodeId] Ids of the search result nodes.
    +
    [DOM.NodeId] Ids of the search result nodes.

    Code Example:

    @@ -1942,12 +2015,12 @@ 

    Code Example:

    });
    -
    -

    DOM.discardSearchResults Command

    +
    +

    DOM.discardSearchResults Command

    Discards search results from the session with the given id. getSearchResults should no longer be called for that search.

    searchId
    -
    String Unique search session identifier.
    +
    String Unique search session identifier.

    Code Example:

    @@ -1955,17 +2028,17 @@ 

    Code Example:

    DOM.discardSearchResults(searchId);
    -
    -

    DOM.requestNode Command

    +
    +

    DOM.requestNode Command

    Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of setChildNodes notifications.

    objectId
    -
    Runtime.RemoteObjectId JavaScript object id to convert into node.
    +
    Runtime.RemoteObjectId JavaScript object id to convert into node.

    Callback Parameters:

    nodeId
    -
    DOM.NodeId Node id for given object.
    +
    DOM.NodeId Node id for given object.

    Code Example:

    @@ -1975,14 +2048,14 @@ 

    Code Example:

    });
    -
    -

    DOM.setInspectModeEnabled Command

    +
    +

    DOM.setInspectModeEnabled Command

    Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspect' command upon element selection.

    enabled
    -
    Boolean True to enable inspection mode, false to disable it.
    +
    Boolean True to enable inspection mode, false to disable it.
    highlightConfig (optional)
    -
    DOM.HighlightConfig A descriptor for the highlight appearance of hovered-over nodes. May be omitted if enabled == false.
    +
    DOM.HighlightConfig A descriptor for the highlight appearance of hovered-over nodes. May be omitted if enabled == false.

    Code Example:

    @@ -1990,22 +2063,22 @@ 

    Code Example:

    DOM.setInspectModeEnabled(enabled, highlightConfig);
    -
    -

    DOM.highlightRect Command

    +
    +

    DOM.highlightRect Command

    Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.

    x
    -
    Integer X coordinate
    +
    Integer X coordinate
    y
    -
    Integer Y coordinate
    +
    Integer Y coordinate
    width
    -
    Integer Rectangle width
    +
    Integer Rectangle width
    height
    -
    Integer Rectangle height
    +
    Integer Rectangle height
    color (optional)
    -
    DOM.RGBA The highlight fill color (default: transparent).
    +
    DOM.RGBA The highlight fill color (default: transparent).
    outlineColor (optional)
    -
    DOM.RGBA The highlight outline color (default: transparent).
    +
    DOM.RGBA The highlight outline color (default: transparent).

    Code Example:

    @@ -2013,14 +2086,14 @@ 

    Code Example:

    DOM.highlightRect(x, y, width, height, color, outlineColor);
    -
    -

    DOM.highlightNode Command

    +
    +

    DOM.highlightNode Command

    Highlights DOM node with given id.

    nodeId
    -
    DOM.NodeId Identifier of the node to highlight.
    +
    DOM.NodeId Identifier of the node to highlight.
    highlightConfig
    -
    DOM.HighlightConfig A descriptor for the highlight appearance.
    +
    DOM.HighlightConfig A descriptor for the highlight appearance.

    Code Example:

    @@ -2028,8 +2101,8 @@ 

    Code Example:

    DOM.highlightNode(nodeId, highlightConfig);
    -
    -

    DOM.hideHighlight Command

    +
    +

    DOM.hideHighlight Command

    Hides DOM node highlight.

    Code Example:

    @@ -2037,16 +2110,16 @@ 

    Code Example:

    DOM.hideHighlight();
    -
    -

    DOM.highlightFrame Command

    +
    +

    DOM.highlightFrame Command

    Highlights owner element of the frame with given id.

    frameId
    -
    Network.FrameId Identifier of the frame to highlight.
    +
    Network.FrameId Identifier of the frame to highlight.
    contentColor (optional)
    -
    DOM.RGBA The content box highlight fill color (default: transparent).
    +
    DOM.RGBA The content box highlight fill color (default: transparent).
    contentOutlineColor (optional)
    -
    DOM.RGBA The content box highlight outline color (default: transparent).
    +
    DOM.RGBA The content box highlight outline color (default: transparent).

    Code Example:

    @@ -2054,17 +2127,17 @@ 

    Code Example:

    DOM.highlightFrame(frameId, contentColor, contentOutlineColor);
    -
    -

    DOM.pushNodeByPathToFrontend Command

    +
    +

    DOM.pushNodeByPathToFrontend Command

    Requests that the node is sent to the caller given its path. // FIXME, use XPath

    path
    -
    String Path to node in the proprietary format.
    +
    String Path to node in the proprietary format.

    Callback Parameters:

    nodeId
    -
    DOM.NodeId Id of the node for given path.
    +
    DOM.NodeId Id of the node for given path.

    Code Example:

    @@ -2074,19 +2147,19 @@ 

    Code Example:

    });
    -
    -

    DOM.resolveNode Command

    +
    +

    DOM.resolveNode Command

    Resolves JavaScript node object for given node id.

    nodeId
    -
    DOM.NodeId Id of the node to resolve.
    +
    DOM.NodeId Id of the node to resolve.
    objectGroup (optional)
    -
    String Symbolic group name that can be used to release multiple objects.
    +
    String Symbolic group name that can be used to release multiple objects.

    Callback Parameters:

    object
    -
    Runtime.RemoteObject JavaScript object wrapper for given node.
    +
    Runtime.RemoteObject JavaScript object wrapper for given node.

    Code Example:

    @@ -2096,17 +2169,17 @@ 

    Code Example:

    });
    -
    -

    DOM.getAttributes Command

    +
    +

    DOM.getAttributes Command

    Returns attributes for the specified node.

    nodeId
    -
    DOM.NodeId Id of the node to retrieve attibutes for.
    +
    DOM.NodeId Id of the node to retrieve attibutes for.

    Callback Parameters:

    attributes
    -
    [String] An interleaved array of node attribute names and values.
    +
    [String] An interleaved array of node attribute names and values.

    Code Example:

    @@ -2116,21 +2189,21 @@ 

    Code Example:

    });
    -
    -

    DOM.moveTo Command

    +
    +

    DOM.moveTo Command

    Moves node into the new container, places it before the given anchor.

    nodeId
    -
    DOM.NodeId Id of the node to drop.
    +
    DOM.NodeId Id of the node to drop.
    targetNodeId
    -
    DOM.NodeId Id of the element to drop into.
    +
    DOM.NodeId Id of the element to drop into.
    insertBeforeNodeId (optional)
    -
    DOM.NodeId Drop node before given one.
    +
    DOM.NodeId Drop node before given one.

    Callback Parameters:

    nodeId
    -
    DOM.NodeId New id of the moved node.
    +
    DOM.NodeId New id of the moved node.

    Code Example:

    @@ -2140,12 +2213,12 @@ 

    Code Example:

    });
    -
    -

    DOM.setTouchEmulationEnabled Command

    +
    +

    DOM.setTouchEmulationEnabled Command

    Toggles mouse event-based touch event emulation.

    enabled
    -
    Boolean Whether the touch event emulation should be enabled.
    +
    Boolean Whether the touch event emulation should be enabled.

    Code Example:

    @@ -2153,8 +2226,8 @@ 

    Code Example:

    DOM.setTouchEmulationEnabled(enabled);
    -
    -

    DOM.undo Command

    +
    +

    DOM.undo Command

    Undoes the last performed action.

    Code Example:

    @@ -2162,8 +2235,8 @@ 

    Code Example:

    DOM.undo();
    -
    -

    DOM.redo Command

    +
    +

    DOM.redo Command

    Re-does the last undone action.

    Code Example:

    @@ -2171,8 +2244,8 @@ 

    Code Example:

    DOM.redo();
    -
    -

    DOM.markUndoableState Command

    +
    +

    DOM.markUndoableState Command

    Marks last undoable state.

    Code Example:

    @@ -2180,8 +2253,8 @@ 

    Code Example:

    DOM.markUndoableState();
    -
    -

    DOM.documentUpdated Event

    +
    +

    DOM.documentUpdated Event

    Fired when Document has been totally updated. Node ids are no longer valid.

    Code Example:

    @@ -2191,14 +2264,14 @@ 

    Code Example:

    }
    -
    -

    DOM.setChildNodes Event

    +
    +

    DOM.setChildNodes Event

    Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

    parentId
    -
    DOM.NodeId Parent node id to populate with children.
    +
    DOM.NodeId Parent node id to populate with children.
    nodes
    -
    [DOM.Node] Child nodes array.
    +
    [DOM.Node] Child nodes array.

    Code Example:

    @@ -2208,16 +2281,16 @@ 

    Code Example:

    }
    -
    -

    DOM.attributeModified Event

    +
    +

    DOM.attributeModified Event

    Fired when Element's attribute is modified.

    nodeId
    -
    DOM.NodeId Id of the node that has changed.
    +
    DOM.NodeId Id of the node that has changed.
    name
    -
    String Attribute name.
    +
    String Attribute name.
    value
    -
    String Attribute value.
    +
    String Attribute value.

    Code Example:

    @@ -2227,14 +2300,14 @@ 

    Code Example:

    }
    -
    -

    DOM.attributeRemoved Event

    +
    +

    DOM.attributeRemoved Event

    Fired when Element's attribute is removed.

    nodeId
    -
    DOM.NodeId Id of the node that has changed.
    +
    DOM.NodeId Id of the node that has changed.
    name
    -
    String A ttribute name.
    +
    String A ttribute name.

    Code Example:

    @@ -2244,12 +2317,12 @@ 

    Code Example:

    }
    -
    -

    DOM.inlineStyleInvalidated Event

    +
    +

    DOM.inlineStyleInvalidated Event

    Fired when Element's inline style is modified via a CSS property modification.

    nodeIds
    -
    [DOM.NodeId] Ids of the nodes for which the inline styles have been invalidated.
    +
    [DOM.NodeId] Ids of the nodes for which the inline styles have been invalidated.

    Code Example:

    @@ -2259,14 +2332,14 @@ 

    Code Example:

    }
    -
    -

    DOM.characterDataModified Event

    +
    +

    DOM.characterDataModified Event

    Mirrors DOMCharacterDataModified event.

    nodeId
    -
    DOM.NodeId Id of the node that has changed.
    +
    DOM.NodeId Id of the node that has changed.
    characterData
    -
    String New text value.
    +
    String New text value.

    Code Example:

    @@ -2276,14 +2349,14 @@ 

    Code Example:

    }
    -
    -

    DOM.childNodeCountUpdated Event

    +
    +

    DOM.childNodeCountUpdated Event

    Fired when Container's child node count has changed.

    nodeId
    -
    DOM.NodeId Id of the node that has changed.
    +
    DOM.NodeId Id of the node that has changed.
    childNodeCount
    -
    Integer New node count.
    +
    Integer New node count.

    Code Example:

    @@ -2293,16 +2366,16 @@ 

    Code Example:

    }
    -
    -

    DOM.childNodeInserted Event

    +
    +

    DOM.childNodeInserted Event

    Mirrors DOMNodeInserted event.

    parentNodeId
    -
    DOM.NodeId Id of the node that has changed.
    +
    DOM.NodeId Id of the node that has changed.
    previousNodeId
    -
    DOM.NodeId If of the previous siblint.
    +
    DOM.NodeId If of the previous siblint.
    node
    -
    DOM.Node Inserted node data.
    +
    DOM.Node Inserted node data.

    Code Example:

    @@ -2312,14 +2385,14 @@ 

    Code Example:

    }
    -
    -

    DOM.childNodeRemoved Event

    +
    +

    DOM.childNodeRemoved Event

    Mirrors DOMNodeRemoved event.

    parentNodeId
    -
    DOM.NodeId Parent id.
    +
    DOM.NodeId Parent id.
    nodeId
    -
    DOM.NodeId Id of the node that has been removed.
    +
    DOM.NodeId Id of the node that has been removed.

    Code Example:

    @@ -2329,14 +2402,14 @@ 

    Code Example:

    }
    -
    -

    DOM.shadowRootPushed Event

    +
    +

    DOM.shadowRootPushed Event

    Called when shadow root is pushed into the element.

    hostId
    -
    DOM.NodeId Host element id.
    +
    DOM.NodeId Host element id.
    root
    -
    DOM.Node Shadow root.
    +
    DOM.Node Shadow root.

    Code Example:

    @@ -2346,14 +2419,14 @@ 

    Code Example:

    }
    -
    -

    DOM.shadowRootPopped Event

    +
    +

    DOM.shadowRootPopped Event

    Called when shadow root is popped from the element.

    hostId
    -
    DOM.NodeId Host element id.
    +
    DOM.NodeId Host element id.
    rootId
    -
    DOM.NodeId Shadow root id.
    +
    DOM.NodeId Shadow root id.

    Code Example:

    @@ -2364,39 +2437,39 @@ 

    Code Example:

    -
    +

    DOMDebugger

    DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.

    -Type +Type -Command +Command -
    -

    DOMDebugger.DOMBreakpointType Type

    +
    +

    DOMDebugger.DOMBreakpointType Type

    DOM breakpoint type.

    ( subtree-modified | attribute-modified | node-removed )
    -
    -

    DOMDebugger.setDOMBreakpoint Command

    +
    +

    DOMDebugger.setDOMBreakpoint Command

    Sets breakpoint on particular operation with DOM.

    nodeId
    -
    DOM.NodeId Identifier of the node to set breakpoint on.
    +
    DOM.NodeId Identifier of the node to set breakpoint on.
    type
    -
    DOMDebugger.DOMBreakpointType Type of the operation to stop upon.
    +
    DOMDebugger.DOMBreakpointType Type of the operation to stop upon.

    Code Example:

    @@ -2404,14 +2477,14 @@ 

    Code Example:

    DOMDebugger.setDOMBreakpoint(nodeId, type);
    -
    -

    DOMDebugger.removeDOMBreakpoint Command

    +
    +

    DOMDebugger.removeDOMBreakpoint Command

    Removes DOM breakpoint that was set using setDOMBreakpoint.

    nodeId
    -
    DOM.NodeId Identifier of the node to remove breakpoint from.
    +
    DOM.NodeId Identifier of the node to remove breakpoint from.
    type
    -
    DOMDebugger.DOMBreakpointType Type of the breakpoint to remove.
    +
    DOMDebugger.DOMBreakpointType Type of the breakpoint to remove.

    Code Example:

    @@ -2419,12 +2492,12 @@ 

    Code Example:

    DOMDebugger.removeDOMBreakpoint(nodeId, type);
    -
    -

    DOMDebugger.setEventListenerBreakpoint Command

    +
    +

    DOMDebugger.setEventListenerBreakpoint Command

    Sets breakpoint on particular DOM event.

    eventName
    -
    String DOM Event name to stop on (any DOM event will do).
    +
    String DOM Event name to stop on (any DOM event will do).

    Code Example:

    @@ -2432,12 +2505,12 @@ 

    Code Example:

    DOMDebugger.setEventListenerBreakpoint(eventName);
    -
    -

    DOMDebugger.removeEventListenerBreakpoint Command

    +
    +

    DOMDebugger.removeEventListenerBreakpoint Command

    Removes breakpoint on particular DOM event.

    eventName
    -
    String Event name.
    +
    String Event name.

    Code Example:

    @@ -2445,12 +2518,12 @@ 

    Code Example:

    DOMDebugger.removeEventListenerBreakpoint(eventName);
    -
    -

    DOMDebugger.setInstrumentationBreakpoint Command

    +
    +

    DOMDebugger.setInstrumentationBreakpoint Command

    Sets breakpoint on particular native event.

    eventName
    -
    String Instrumentation name to stop on.
    +
    String Instrumentation name to stop on.

    Code Example:

    @@ -2458,12 +2531,12 @@ 

    Code Example:

    DOMDebugger.setInstrumentationBreakpoint(eventName);
    -
    -

    DOMDebugger.removeInstrumentationBreakpoint Command

    +
    +

    DOMDebugger.removeInstrumentationBreakpoint Command

    Sets breakpoint on particular native event.

    eventName
    -
    String Instrumentation name to stop on.
    +
    String Instrumentation name to stop on.

    Code Example:

    @@ -2471,12 +2544,12 @@ 

    Code Example:

    DOMDebugger.removeInstrumentationBreakpoint(eventName);
    -
    -

    DOMDebugger.setXHRBreakpoint Command

    +
    +

    DOMDebugger.setXHRBreakpoint Command

    Sets breakpoint on XMLHttpRequest.

    url
    -
    String Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
    +
    String Resource URL substring. All XHRs having this substring in the URL will get stopped upon.

    Code Example:

    @@ -2484,12 +2557,12 @@ 

    Code Example:

    DOMDebugger.setXHRBreakpoint(url);
    -
    -

    DOMDebugger.removeXHRBreakpoint Command

    +
    +

    DOMDebugger.removeXHRBreakpoint Command

    Removes breakpoint from XMLHttpRequest.

    url
    -
    String Resource URL substring.
    +
    String Resource URL substring.

    Code Example:

    @@ -2498,56 +2571,56 @@ 

    Code Example:

    -
    +

    DOMStorage

    -Type +Type -Command +Command -Event +Event -
    -

    DOMStorage.StorageId Type

    +
    +

    DOMStorage.StorageId Type

    Unique identifier of DOM storage entry.

    String
    -
    -

    DOMStorage.Entry Type

    +
    +

    DOMStorage.Entry Type

    DOM Storage entry.

    host
    -
    String Domain name.
    +
    String Domain name.
    isLocalStorage
    -
    Boolean True for local storage.
    +
    Boolean True for local storage.
    id
    -
    DOMStorage.StorageId Entry id for further reference.
    +
    DOMStorage.StorageId Entry id for further reference.
    -
    -

    DOMStorage.Item Type

    +
    +

    DOMStorage.Item Type

    DOM Storage item.

    [String]
    -
    -

    DOMStorage.enable Command

    +
    +

    DOMStorage.enable Command

    Enables storage tracking, storage events will now be delivered to the client.

    Code Example:

    @@ -2555,8 +2628,8 @@ 

    Code Example:

    DOMStorage.enable();
    -
    -

    DOMStorage.disable Command

    +
    +

    DOMStorage.disable Command

    Disables storage tracking, prevents storage events from being sent to the client.

    Code Example:

    @@ -2564,16 +2637,16 @@ 

    Code Example:

    DOMStorage.disable();
    -
    -

    DOMStorage.getDOMStorageEntries Command

    +
    +

    DOMStorage.getDOMStorageEntries Command

    storageId
    -
    DOMStorage.StorageId
    +
    DOMStorage.StorageId

    Callback Parameters:

    entries
    -
    [DOMStorage.Item]
    +
    [DOMStorage.Item]

    Code Example:

    @@ -2583,11 +2656,11 @@ 

    Code Example:

    });
    -
    -

    DOMStorage.setDOMStorageItem Command

    +
    +

    DOMStorage.setDOMStorageItem Command

    storageId
    -
    DOMStorage.StorageId
    +
    DOMStorage.StorageId
    key
    String
    value
    @@ -2606,11 +2679,11 @@

    Code Example:

    });
    -
    -

    DOMStorage.removeDOMStorageItem Command

    +
    +

    DOMStorage.removeDOMStorageItem Command

    storageId
    -
    DOMStorage.StorageId
    +
    DOMStorage.StorageId
    key
    String
    @@ -2627,11 +2700,11 @@

    Code Example:

    });
    -
    -

    DOMStorage.addDOMStorage Event

    +
    +

    DOMStorage.addDOMStorage Event

    storage
    -
    DOMStorage.Entry
    +
    DOMStorage.Entry

    Code Example:

    @@ -2641,11 +2714,11 @@ 

    Code Example:

    }
    -
    -

    DOMStorage.domStorageUpdated Event

    +
    +

    DOMStorage.domStorageUpdated Event

    storageId
    -
    DOMStorage.StorageId
    +
    DOMStorage.StorageId

    Code Example:

    @@ -2656,55 +2729,55 @@ 

    Code Example:

    -
    +

    Database

    -Type +Type -Command +Command -Event +Event -
    -

    Database.DatabaseId Type

    +
    +

    Database.DatabaseId Type

    Unique identifier of Database object.

    String
    -
    -

    Database.Database Type

    +
    +

    Database.Database Type

    Database object.

    id
    -
    Database.DatabaseId Database ID.
    +
    Database.DatabaseId Database ID.
    domain
    -
    String Database domain.
    +
    String Database domain.
    name
    -
    String Database name.
    +
    String Database name.
    version
    -
    String Database version.
    +
    String Database version.
    -
    -

    Database.Error Type

    +
    +

    Database.Error Type

    Database error.

    -
    -

    Database.enable Command

    +
    +

    Database.enable Command

    Enables database tracking, database events will now be delivered to the client.

    Code Example:

    @@ -2712,8 +2785,8 @@ 

    Code Example:

    Database.enable();
    -
    -

    Database.disable Command

    +
    +

    Database.disable Command

    Disables database tracking, prevents database events from being sent to the client.

    Code Example:

    @@ -2721,11 +2794,11 @@ 

    Code Example:

    Database.disable();
    -
    -

    Database.getDatabaseTableNames Command

    +
    +

    Database.getDatabaseTableNames Command

    databaseId
    -
    Database.DatabaseId
    +
    Database.DatabaseId

    Callback Parameters:

    @@ -2740,11 +2813,11 @@

    Code Example:

    });
    -
    -

    Database.executeSQL Command

    +
    +

    Database.executeSQL Command

    databaseId
    -
    Database.DatabaseId
    +
    Database.DatabaseId
    query
    String
    @@ -2763,11 +2836,11 @@

    Code Example:

    });
    -
    -

    Database.addDatabase Event

    +
    +

    Database.addDatabase Event

    database
    -
    Database.Database
    +
    Database.Database

    Code Example:

    @@ -2777,8 +2850,8 @@ 

    Code Example:

    }
    -
    -

    Database.sqlTransactionSucceeded Event

    +
    +

    Database.sqlTransactionSucceeded Event

    transactionId
    Integer
    @@ -2795,13 +2868,13 @@

    Code Example:

    }
    -
    -

    Database.sqlTransactionFailed Event

    +
    +

    Database.sqlTransactionFailed Event

    transactionId
    Integer
    sqlError
    -
    Database.Error
    +
    Database.Error

    Code Example:

    @@ -2812,137 +2885,138 @@ 

    Code Example:

    -
    +

    Debugger

    Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.

    -Type +Type -Command +Command -Event +Event -
    -

    Debugger.BreakpointId Type

    +
    +

    Debugger.BreakpointId Type

    Breakpoint identifier.

    String
    -
    -

    Debugger.ScriptId Type

    +
    +

    Debugger.ScriptId Type

    Unique script identifier.

    String
    -
    -

    Debugger.CallFrameId Type

    +
    +

    Debugger.CallFrameId Type

    Call frame identifier.

    String
    -
    -

    Debugger.Location Type

    +
    +

    Debugger.Location Type

    Location in the source code.

    scriptId
    -
    Debugger.ScriptId Script identifier as reported in the Debugger.scriptParsed.
    +
    Debugger.ScriptId Script identifier as reported in the Debugger.scriptParsed.
    lineNumber
    -
    Integer Line number in the script.
    +
    Integer Line number in the script.
    columnNumber (optional)
    -
    Integer Column number in the script.
    +
    Integer Column number in the script.
    -
    -

    Debugger.FunctionDetails Type

    +
    +

    Debugger.FunctionDetails Type

    Information about the function.

    location
    -
    Debugger.Location Location of the function.
    +
    Debugger.Location Location of the function.
    name (optional)
    -
    String Name of the function. Not present for anonymous functions.
    +
    String Name of the function. Not present for anonymous functions.
    displayName (optional)
    -
    String Display name of the function(specified in 'displayName' property on the function object).
    +
    String Display name of the function(specified in 'displayName' property on the function object).
    inferredName (optional)
    -
    String Name of the function inferred from its initial assignment.
    +
    String Name of the function inferred from its initial assignment.
    scopeChain (optional)
    -
    [Debugger.Scope] Scope chain for this closure.
    +
    [Debugger.Scope] Scope chain for this closure.
    -
    -

    Debugger.CallFrame Type

    +
    +

    Debugger.CallFrame Type

    JavaScript call frame. Array of call frames form the call stack.

    callFrameId
    -
    Debugger.CallFrameId Call frame identifier. This identifier is only valid while the virtual machine is paused.
    +
    Debugger.CallFrameId Call frame identifier. This identifier is only valid while the virtual machine is paused.
    functionName
    -
    String Name of the JavaScript function called on this call frame.
    +
    String Name of the JavaScript function called on this call frame.
    location
    -
    Debugger.Location Location in the source code.
    +
    Debugger.Location Location in the source code.
    scopeChain
    -
    [Debugger.Scope] Scope chain for this call frame.
    +
    [Debugger.Scope] Scope chain for this call frame.
    this
    -
    Runtime.RemoteObject this object for this call frame.
    +
    Runtime.RemoteObject this object for this call frame.
    -
    -

    Debugger.Scope Type

    +
    +

    Debugger.Scope Type

    Scope description.

    type
    -
    ( global | local | with | closure | catch ) Scope type.
    +
    ( global | local | with | closure | catch ) Scope type.
    object
    -
    Runtime.RemoteObject Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
    +
    Runtime.RemoteObject Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
    -
    -

    Debugger.causesRecompilation Command

    +
    +

    Debugger.causesRecompilation Command

    Tells whether enabling debugger causes scripts recompilation.

    Callback Parameters:

    result
    -
    Boolean True if enabling debugger causes scripts recompilation.
    +
    Boolean True if enabling debugger causes scripts recompilation.

    Code Example:

    @@ -2952,13 +3026,13 @@ 

    Code Example:

    });
    -
    -

    Debugger.supportsSeparateScriptCompilationAndExecution Command

    +
    +

    Debugger.supportsSeparateScriptCompilationAndExecution Command

    Tells whether debugger supports separate script compilation and execution.

    Callback Parameters:

    result
    -
    Boolean True if debugger supports separate script compilation and execution.
    +
    Boolean True if debugger supports separate script compilation and execution.

    Code Example:

    @@ -2968,8 +3042,8 @@ 

    Code Example:

    });
    -
    -

    Debugger.enable Command

    +
    +

    Debugger.enable Command

    Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

    Code Example:

    @@ -2977,8 +3051,8 @@ 

    Code Example:

    Debugger.enable();
    -
    -

    Debugger.disable Command

    +
    +

    Debugger.disable Command

    Disables debugger for given page.

    Code Example:

    @@ -2986,12 +3060,12 @@ 

    Code Example:

    Debugger.disable();
    -
    -

    Debugger.setBreakpointsActive Command

    +
    +

    Debugger.setBreakpointsActive Command

    Activates / deactivates all breakpoints on the page.

    active
    -
    Boolean New value for breakpoints active state.
    +
    Boolean New value for breakpoints active state.

    Code Example:

    @@ -2999,27 +3073,27 @@ 

    Code Example:

    Debugger.setBreakpointsActive(active);
    -
    -

    Debugger.setBreakpointByUrl Command

    +
    +

    Debugger.setBreakpointByUrl Command

    Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.

    lineNumber
    -
    Integer Line number to set breakpoint at.
    +
    Integer Line number to set breakpoint at.
    url (optional)
    -
    String URL of the resources to set breakpoint on.
    +
    String URL of the resources to set breakpoint on.
    urlRegex (optional)
    -
    String Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
    +
    String Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
    columnNumber (optional)
    -
    Integer Offset in the line to set breakpoint at.
    +
    Integer Offset in the line to set breakpoint at.
    condition (optional)
    -
    String Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
    +
    String Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.

    Callback Parameters:

    breakpointId
    -
    Debugger.BreakpointId Id of the created breakpoint for further reference.
    +
    Debugger.BreakpointId Id of the created breakpoint for further reference.
    locations
    -
    [Debugger.Location] List of the locations this breakpoint resolved into upon addition.
    +
    [Debugger.Location] List of the locations this breakpoint resolved into upon addition.

    Code Example:

    @@ -3029,21 +3103,21 @@ 

    Code Example:

    });
    -
    -

    Debugger.setBreakpoint Command

    +
    +

    Debugger.setBreakpoint Command

    Sets JavaScript breakpoint at a given location.

    location
    -
    Debugger.Location Location to set breakpoint in.
    +
    Debugger.Location Location to set breakpoint in.
    condition (optional)
    -
    String Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
    +
    String Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.

    Callback Parameters:

    breakpointId
    -
    Debugger.BreakpointId Id of the created breakpoint for further reference.
    +
    Debugger.BreakpointId Id of the created breakpoint for further reference.
    actualLocation
    -
    Debugger.Location Location this breakpoint resolved into.
    +
    Debugger.Location Location this breakpoint resolved into.

    Code Example:

    @@ -3053,12 +3127,12 @@ 

    Code Example:

    });
    -
    -

    Debugger.removeBreakpoint Command

    +
    +

    Debugger.removeBreakpoint Command

    Removes JavaScript breakpoint.

    breakpointId
    -
    Debugger.BreakpointId
    +
    Debugger.BreakpointId

    Code Example:

    @@ -3066,12 +3140,12 @@ 

    Code Example:

    Debugger.removeBreakpoint(breakpointId);
    -
    -

    Debugger.continueToLocation Command

    +
    +

    Debugger.continueToLocation Command

    Continues execution until specific location is reached.

    location
    -
    Debugger.Location Location to continue to.
    +
    Debugger.Location Location to continue to.

    Code Example:

    @@ -3079,8 +3153,8 @@ 

    Code Example:

    Debugger.continueToLocation(location);
    -
    -

    Debugger.stepOver Command

    +
    +

    Debugger.stepOver Command

    Steps over the statement.

    Code Example:

    @@ -3088,8 +3162,8 @@ 

    Code Example:

    Debugger.stepOver();
    -
    -

    Debugger.stepInto Command

    +
    +

    Debugger.stepInto Command

    Steps into the function call.

    Code Example:

    @@ -3097,8 +3171,8 @@ 

    Code Example:

    Debugger.stepInto();
    -
    -

    Debugger.stepOut Command

    +
    +

    Debugger.stepOut Command

    Steps out of the function call.

    Code Example:

    @@ -3106,8 +3180,8 @@ 

    Code Example:

    Debugger.stepOut();
    -
    -

    Debugger.pause Command

    +
    +

    Debugger.pause Command

    Stops on the next JavaScript statement.

    Code Example:

    @@ -3115,8 +3189,8 @@ 

    Code Example:

    Debugger.pause();
    -
    -

    Debugger.resume Command

    +
    +

    Debugger.resume Command

    Resumes JavaScript execution.

    Code Example:

    @@ -3124,23 +3198,23 @@ 

    Code Example:

    Debugger.resume();
    -
    -

    Debugger.searchInContent Command

    +
    +

    Debugger.searchInContent Command

    Searches for given string in script content.

    scriptId
    -
    Debugger.ScriptId Id of the script to search in.
    +
    Debugger.ScriptId Id of the script to search in.
    query
    -
    String String to search for.
    +
    String String to search for.
    caseSensitive (optional)
    -
    Boolean If true, search is case sensitive.
    +
    Boolean If true, search is case sensitive.
    isRegex (optional)
    -
    Boolean If true, treats string parameter as regex.
    +
    Boolean If true, treats string parameter as regex.

    Callback Parameters:

    result
    -
    [Page.SearchMatch] List of search matches.
    +
    [Page.SearchMatch] List of search matches.

    Code Example:

    @@ -3150,13 +3224,13 @@ 

    Code Example:

    });
    -
    -

    Debugger.canSetScriptSource Command

    +
    +

    Debugger.canSetScriptSource Command

    Tells whether setScriptSource is supported.

    Callback Parameters:

    result
    -
    Boolean True if setScriptSource is supported.
    +
    Boolean True if setScriptSource is supported.

    Code Example:

    @@ -3166,23 +3240,23 @@ 

    Code Example:

    });
    -
    -

    Debugger.setScriptSource Command

    +
    +

    Debugger.setScriptSource Command

    Edits JavaScript source live.

    scriptId
    -
    Debugger.ScriptId Id of the script to edit.
    +
    Debugger.ScriptId Id of the script to edit.
    scriptSource
    -
    String New content of the script.
    +
    String New content of the script.
    preview (optional)
    -
    Boolean If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.
    +
    Boolean If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.

    Callback Parameters:

    callFrames (optional)
    -
    [Debugger.CallFrame] New stack trace in case editing has happened while VM was stopped.
    +
    [Debugger.CallFrame] New stack trace in case editing has happened while VM was stopped.
    result (optional)
    -
    Object VM-specific description of the changes applied.
    +
    Object VM-specific description of the changes applied.

    Code Example:

    @@ -3192,19 +3266,19 @@ 

    Code Example:

    });
    -
    -

    Debugger.restartFrame Command

    +
    +

    Debugger.restartFrame Command

    Restarts particular call frame from the beginning.

    callFrameId
    -
    Debugger.CallFrameId Call frame identifier to evaluate on.
    +
    Debugger.CallFrameId Call frame identifier to evaluate on.

    Callback Parameters:

    callFrames
    -
    [Debugger.CallFrame] New stack trace.
    +
    [Debugger.CallFrame] New stack trace.
    result
    -
    Object VM-specific description.
    +
    Object VM-specific description.

    Code Example:

    @@ -3214,17 +3288,17 @@ 

    Code Example:

    });
    -
    -

    Debugger.getScriptSource Command

    +
    +

    Debugger.getScriptSource Command

    Returns source for the script with given id.

    scriptId
    -
    Debugger.ScriptId Id of the script to get source for.
    +
    Debugger.ScriptId Id of the script to get source for.

    Callback Parameters:

    scriptSource
    -
    String Script source.
    +
    String Script source.

    Code Example:

    @@ -3234,17 +3308,17 @@ 

    Code Example:

    });
    -
    -

    Debugger.getFunctionDetails Command

    +
    +

    Debugger.getFunctionDetails Command

    Returns detailed informtation on given function.

    functionId
    -
    Runtime.RemoteObjectId Id of the function to get location for.
    +
    Runtime.RemoteObjectId Id of the function to get location for.

    Callback Parameters:

    details
    -
    Debugger.FunctionDetails Information about the function.
    +
    Debugger.FunctionDetails Information about the function.

    Code Example:

    @@ -3254,12 +3328,12 @@ 

    Code Example:

    });
    -
    -

    Debugger.setPauseOnExceptions Command

    +
    +

    Debugger.setPauseOnExceptions Command

    Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none.

    state
    -
    ( none | uncaught | all ) Pause on exceptions mode.
    +
    ( none | uncaught | all ) Pause on exceptions mode.

    Code Example:

    @@ -3267,29 +3341,29 @@ 

    Code Example:

    Debugger.setPauseOnExceptions(state);
    -
    -

    Debugger.evaluateOnCallFrame Command

    +
    +

    Debugger.evaluateOnCallFrame Command

    Evaluates expression on a given call frame.

    callFrameId
    -
    Debugger.CallFrameId Call frame identifier to evaluate on.
    +
    Debugger.CallFrameId Call frame identifier to evaluate on.
    expression
    -
    String Expression to evaluate.
    +
    String Expression to evaluate.
    objectGroup (optional)
    -
    String String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).
    +
    String String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).
    includeCommandLineAPI (optional)
    -
    Boolean Specifies whether command line API should be available to the evaluated expression, defaults to false.
    +
    Boolean Specifies whether command line API should be available to the evaluated expression, defaults to false.
    doNotPauseOnExceptionsAndMuteConsole (optional)
    -
    Boolean Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.
    +
    Boolean Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.
    returnByValue (optional)
    -
    Boolean Whether the result is expected to be a JSON object that should be sent by value.
    +
    Boolean Whether the result is expected to be a JSON object that should be sent by value.

    Callback Parameters:

    result
    -
    Runtime.RemoteObject Object wrapper for the evaluation result.
    +
    Runtime.RemoteObject Object wrapper for the evaluation result.
    wasThrown (optional)
    -
    Boolean True if the result was thrown during the evaluation.
    +
    Boolean True if the result was thrown during the evaluation.

    Code Example:

    @@ -3299,21 +3373,21 @@ 

    Code Example:

    });
    -
    -

    Debugger.compileScript Command

    +
    +

    Debugger.compileScript Command

    Compiles expression.

    expression
    -
    String Expression to compile.
    +
    String Expression to compile.
    sourceURL
    -
    String Source url to be set for the script.
    +
    String Source url to be set for the script.

    Callback Parameters:

    scriptId (optional)
    -
    Debugger.ScriptId Id of the script.
    +
    Debugger.ScriptId Id of the script.
    syntaxErrorMessage (optional)
    -
    String Syntax error message if compilation failed.
    +
    String Syntax error message if compilation failed.

    Code Example:

    @@ -3323,36 +3397,49 @@ 

    Code Example:

    });
    -
    -

    Debugger.runScript Command

    +
    +

    Debugger.runScript Command

    Runs script with given id in a given context.

    -
    contextId (optional)
    -
    Runtime.ExecutionContextId Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
    scriptId
    -
    Debugger.ScriptId Id of the script to run.
    +
    Debugger.ScriptId Id of the script to run.
    +
    contextId (optional)
    +
    Runtime.ExecutionContextId Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
    objectGroup (optional)
    -
    String Symbolic group name that can be used to release multiple objects.
    +
    String Symbolic group name that can be used to release multiple objects.
    doNotPauseOnExceptionsAndMuteConsole (optional)
    -
    Boolean Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state.
    +
    Boolean Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state.

    Callback Parameters:

    result
    -
    Runtime.RemoteObject Run result.
    +
    Runtime.RemoteObject Run result.
    wasThrown (optional)
    -
    Boolean True if the result was thrown during the script run.
    +
    Boolean True if the result was thrown during the script run.

    Code Example:

     // WebInspector Command: Debugger.runScript
    -Debugger.runScript(contextId, scriptId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, function callback(res) {
    +Debugger.runScript(scriptId, contextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, function callback(res) {
     	// res = {result, wasThrown}
     });
     
    -
    -

    Debugger.globalObjectCleared Event

    +
    +

    Debugger.setOverlayMessage Command

    +

    Sets overlay message.

    +
    +
    message (optional)
    +
    String Overlay message to display when paused in debugger.
    +
    +

    Code Example:

    +
    +// WebInspector Command: Debugger.setOverlayMessage
    +Debugger.setOverlayMessage(message);
    +
    +
    +
    +

    Debugger.globalObjectCleared Event

    Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.

    Code Example:

    @@ -3362,26 +3449,26 @@ 

    Code Example:

    }
    -
    -

    Debugger.scriptParsed Event

    +
    +

    Debugger.scriptParsed Event

    Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.

    scriptId
    -
    Debugger.ScriptId Identifier of the script parsed.
    +
    Debugger.ScriptId Identifier of the script parsed.
    url
    -
    String URL or name of the script parsed (if any).
    +
    String URL or name of the script parsed (if any).
    startLine
    -
    Integer Line offset of the script within the resource with given URL (for script tags).
    +
    Integer Line offset of the script within the resource with given URL (for script tags).
    startColumn
    -
    Integer Column offset of the script within the resource with given URL.
    +
    Integer Column offset of the script within the resource with given URL.
    endLine
    -
    Integer Last line of the script.
    +
    Integer Last line of the script.
    endColumn
    -
    Integer Length of the last line of the script.
    +
    Integer Length of the last line of the script.
    isContentScript (optional)
    -
    Boolean Determines whether this script is a user extension script.
    +
    Boolean Determines whether this script is a user extension script.
    sourceMapURL (optional)
    -
    String URL of source map associated with script (if any).
    +
    String URL of source map associated with script (if any).

    Code Example:

    @@ -3391,20 +3478,20 @@ 

    Code Example:

    }
    -
    -

    Debugger.scriptFailedToParse Event

    +
    +

    Debugger.scriptFailedToParse Event

    Fired when virtual machine fails to parse the script.

    url
    -
    String URL of the script that failed to parse.
    +
    String URL of the script that failed to parse.
    scriptSource
    -
    String Source text of the script that failed to parse.
    +
    String Source text of the script that failed to parse.
    startLine
    -
    Integer Line offset of the script within the resource.
    +
    Integer Line offset of the script within the resource.
    errorLine
    -
    Integer Line with error.
    +
    Integer Line with error.
    errorMessage
    -
    String Parse error message.
    +
    String Parse error message.

    Code Example:

    @@ -3414,14 +3501,14 @@ 

    Code Example:

    }
    -
    -

    Debugger.breakpointResolved Event

    +
    +

    Debugger.breakpointResolved Event

    Fired when breakpoint is resolved to an actual script and location.

    breakpointId
    -
    Debugger.BreakpointId Breakpoint unique identifier.
    +
    Debugger.BreakpointId Breakpoint unique identifier.
    location
    -
    Debugger.Location Actual breakpoint location.
    +
    Debugger.Location Actual breakpoint location.

    Code Example:

    @@ -3431,16 +3518,16 @@ 

    Code Example:

    }
    -
    -

    Debugger.paused Event

    +
    +

    Debugger.paused Event

    Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.

    callFrames
    -
    [Debugger.CallFrame] Call stack the virtual machine stopped on.
    +
    [Debugger.CallFrame] Call stack the virtual machine stopped on.
    reason
    -
    ( XHR | DOM | EventListener | exception | other ) Pause reason.
    +
    ( XHR | DOM | EventListener | exception | other ) Pause reason.
    data (optional)
    -
    Object Object containing break-specific auxiliary properties.
    +
    Object Object containing break-specific auxiliary properties.

    Code Example:

    @@ -3450,8 +3537,8 @@ 

    Code Example:

    }
    -
    -

    Debugger.resumed Event

    +
    +

    Debugger.resumed Event

    Fired when the virtual machine resumed execution.

    Code Example:

    @@ -3462,64 +3549,68 @@ 

    Code Example:

    -
    +

    FileSystem

    -Type +Type -Command +Command -Event +Event -
    -

    FileSystem.RequestId Type

    +
    +

    FileSystem.RequestId Type

    Request Identifier to glue a request and its completion event.

    Integer
    -
    -

    FileSystem.Entry Type

    +
    +

    FileSystem.Entry Type

    Represents a browser side file or directory.

    url
    -
    String filesystem: URL for the entry.
    +
    String filesystem: URL for the entry.
    name
    -
    String The name of the file or directory.
    +
    String The name of the file or directory.
    isDirectory
    -
    Boolean True if the entry is a directory.
    +
    Boolean True if the entry is a directory.
    mimeType (optional)
    -
    String MIME type of the entry, available for a file only.
    +
    String MIME type of the entry, available for a file only.
    resourceType (optional)
    -
    Page.ResourceType ResourceType of the entry, available for a file only.
    +
    Page.ResourceType ResourceType of the entry, available for a file only.
    +
    isTextFile (optional)
    +
    Boolean True if the entry is a text file.
    -
    -

    FileSystem.Metadata Type

    +
    +

    FileSystem.Metadata Type

    Represents metadata of a file or entry.

    modificationTime
    -
    Number Modification time.
    -
    size (optional)
    -
    Number File size. This field is available only for a file.
    +
    Number Modification time.
    +
    size
    +
    Number File size. This field is always zero for directories.
    -
    -

    FileSystem.enable Command

    +
    +

    FileSystem.enable Command

    Enables events from backend.

    Code Example:

    @@ -3527,8 +3618,8 @@ 

    Code Example:

    FileSystem.enable();
    -
    -

    FileSystem.disable Command

    +
    +

    FileSystem.disable Command

    Disables events from backend.

    Code Example:

    @@ -3536,19 +3627,19 @@ 

    Code Example:

    FileSystem.disable();
    -
    -

    FileSystem.requestFileSystemRoot Command

    +
    +

    FileSystem.requestFileSystemRoot Command

    Returns root directory of the FileSystem as fileSystemRootReceived event, if exists.

    origin
    -
    String Security origin of requesting FileSystem. One of frames in current page needs to have this security origin.
    +
    String Security origin of requesting FileSystem. One of frames in current page needs to have this security origin.
    type
    -
    ( temporary | persistent ) FileSystem type of requesting FileSystem.
    +
    ( temporary | persistent ) FileSystem type of requesting FileSystem.

    Callback Parameters:

    requestId
    -
    FileSystem.RequestId Request identifier. Corresponding fileSystemRootReceived event should have same requestId with this.
    +
    FileSystem.RequestId Request identifier. Corresponding fileSystemRootReceived event should have same requestId with this.

    Code Example:

    @@ -3558,17 +3649,17 @@ 

    Code Example:

    });
    -
    -

    FileSystem.requestDirectoryContent Command

    +
    +

    FileSystem.requestDirectoryContent Command

    Returns content of the directory as directoryContentReceived event.

    url
    -
    String URL of the directory that the frontend is requesting to read from.
    +
    String URL of the directory that the frontend is requesting to read from.

    Callback Parameters:

    requestId
    -
    FileSystem.RequestId Request identifier. Corresponding directoryContentReceived event should have same requestId with this.
    +
    FileSystem.RequestId Request identifier. Corresponding directoryContentReceived event should have same requestId with this.

    Code Example:

    @@ -3578,17 +3669,17 @@ 

    Code Example:

    });
    -
    -

    FileSystem.requestMetadata Command

    +
    +

    FileSystem.requestMetadata Command

    Returns metadata of the entry as metadataReceived event.

    url
    -
    String URL of the entry that the frontend is requesting to get metadata from.
    +
    String URL of the entry that the frontend is requesting to get metadata from.

    Callback Parameters:

    requestId
    -
    FileSystem.RequestId Request identifier. Corresponding metadataReceived event should have same requestId with this.
    +
    FileSystem.RequestId Request identifier. Corresponding metadataReceived event should have same requestId with this.

    Code Example:

    @@ -3598,16 +3689,44 @@ 

    Code Example:

    });
    -
    -

    FileSystem.fileSystemRootReceived Event

    +
    +

    FileSystem.requestFileContent Command

    +

    Returns content of the file as fileContentReceived event. Result should be sliced into [start, end).

    +
    +
    url
    +
    String URL of the file that the frontend is requesting to read from.
    +
    readAsText
    +
    Boolean True if the content should be read as text, otherwise the result will be returned as base64 encoded text.
    +
    start (optional)
    +
    Integer Specifies the start of range to read.
    +
    end (optional)
    +
    Integer Specifies the end of range to read exclusively.
    +
    charset (optional)
    +
    String Overrides charset of the content when content is served as text.
    +
    +

    Callback Parameters:

    +
    +
    requestId
    +
    FileSystem.RequestId Request identifier. Corresponding fileContentReceived event should have same requestId with this.
    +
    +

    Code Example:

    +
    +// WebInspector Command: FileSystem.requestFileContent
    +FileSystem.requestFileContent(url, readAsText, start, end, charset, function callback(res) {
    +	// res = {requestId}
    +});
    +
    +
    +
    +

    FileSystem.fileSystemRootReceived Event

    Completion event of requestFileSystemRoot command.

    requestId
    -
    Integer Request Identifier that was returned by corresponding requestFileSystemRoot command.
    +
    Integer Request Identifier that was returned by corresponding requestFileSystemRoot command.
    errorCode
    -
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    +
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    root (optional)
    -
    FileSystem.Entry Contains root of the requested FileSystem if the command completed successfully.
    +
    FileSystem.Entry Contains root of the requested FileSystem if the command completed successfully.

    Code Example:

    @@ -3617,16 +3736,16 @@ 

    Code Example:

    }
    -
    -

    FileSystem.directoryContentReceived Event

    +
    +

    FileSystem.directoryContentReceived Event

    Completion event of requestDirectoryContent command.

    requestId
    -
    Integer Request Identifier that was returned by corresponding requestDirectoryContent command.
    +
    Integer Request Identifier that was returned by corresponding requestDirectoryContent command.
    errorCode
    -
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    +
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    entries (optional)
    -
    [FileSystem.Entry] Contains all entries on directory if the command completed successfully.
    +
    [FileSystem.Entry] Contains all entries on directory if the command completed successfully.

    Code Example:

    @@ -3636,16 +3755,16 @@ 

    Code Example:

    }
    -
    -

    FileSystem.metadataReceived Event

    -

    Completion event of getMetadata command.

    +
    +

    FileSystem.metadataReceived Event

    +

    Completion event of requestMetadata command.

    requestId
    -
    Integer Request Identifier that was returned in response to the corresponding getMetadata request.
    +
    Integer Request Identifier that was returned in response to the corresponding requestMetadata command.
    errorCode
    -
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    +
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    metadata (optional)
    -
    FileSystem.Metadata Contains metadata of the entry if the command completed successfully.
    +
    FileSystem.Metadata Contains metadata of the entry if the command completed successfully.

    Code Example:

    @@ -3655,140 +3774,163 @@ 

    Code Example:

    }
    +
    +

    FileSystem.fileContentReceived Event

    +

    Completion event of requestFileContent command.

    +
    +
    requestId
    +
    Integer Request Identifier that was returned in response to the corresponding requestFileContent command.
    +
    errorCode
    +
    Integer 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.
    +
    content (optional)
    +
    String Content of the file.
    +
    charset (optional)
    +
    String Charset of the content if it is served as text.
    +
    +

    Code Example:

    +
    +// WebInspector Event: FileSystem.fileContentReceived
    +function onFileContentReceived(res) {
    +	// res = {requestId, errorCode, content, charset}
    +}
    +
    +
    -
    +

    IndexedDB

    -Type +Type -Command +Command -Event +Event -
    -

    IndexedDB.SecurityOriginWithDatabaseNames Type

    +
    +

    IndexedDB.SecurityOriginWithDatabaseNames Type

    Security origin with database names.

    securityOrigin
    -
    String Security origin.
    +
    String Security origin.
    databaseNames
    -
    [String] Database names for this origin.
    +
    [String] Database names for this origin.
    -
    -

    IndexedDB.DatabaseWithObjectStores Type

    +
    +

    IndexedDB.DatabaseWithObjectStores Type

    Database with an array of object stores.

    name
    -
    String Database name.
    +
    String Database name.
    version
    -
    String Database version.
    +
    String Database version.
    objectStores
    -
    [IndexedDB.ObjectStore] Object stores in this database.
    +
    [IndexedDB.ObjectStore] Object stores in this database.
    -
    -

    IndexedDB.ObjectStore Type

    +
    +

    IndexedDB.ObjectStore Type

    Object store.

    name
    -
    String Object store name.
    +
    String Object store name.
    keyPath
    -
    IndexedDB.KeyPath Object store key path.
    +
    IndexedDB.KeyPath Object store key path.
    +
    autoIncrement
    +
    Boolean If true, object store has auto increment flag set.
    indexes
    -
    [IndexedDB.ObjectStoreIndex] Indexes in this object store.
    +
    [IndexedDB.ObjectStoreIndex] Indexes in this object store.
    -
    -

    IndexedDB.ObjectStoreIndex Type

    +
    +

    IndexedDB.ObjectStoreIndex Type

    Object store index.

    name
    -
    String Index name.
    +
    String Index name.
    keyPath
    -
    IndexedDB.KeyPath Index key path.
    +
    IndexedDB.KeyPath Index key path.
    unique
    -
    Boolean If true, index is unique.
    +
    Boolean If true, index is unique.
    multiEntry
    -
    Boolean If true, index allows multiple entries for a key.
    +
    Boolean If true, index allows multiple entries for a key.
    -
    -

    IndexedDB.Key Type

    +
    +

    IndexedDB.Key Type

    Key.

    type
    -
    ( number | string | date | array ) Key type.
    +
    ( number | string | date | array ) Key type.
    number (optional)
    -
    Number Number value.
    +
    Number Number value.
    string (optional)
    -
    String String value.
    +
    String String value.
    date (optional)
    -
    Number Date value.
    +
    Number Date value.
    array (optional)
    -
    [IndexedDB.Key] Array value.
    +
    [IndexedDB.Key] Array value.
    -
    -

    IndexedDB.KeyRange Type

    +
    +

    IndexedDB.KeyRange Type

    Key range.

    lower (optional)
    -
    IndexedDB.Key Lower bound.
    +
    IndexedDB.Key Lower bound.
    upper (optional)
    -
    IndexedDB.Key Upper bound.
    +
    IndexedDB.Key Upper bound.
    lowerOpen
    -
    Boolean If true lower bound is open.
    +
    Boolean If true lower bound is open.
    upperOpen
    -
    Boolean If true upper bound is open.
    +
    Boolean If true upper bound is open.
    -
    -

    IndexedDB.DataEntry Type

    +
    +

    IndexedDB.DataEntry Type

    Data entry.

    key
    -
    IndexedDB.Key Key.
    +
    IndexedDB.Key Key.
    primaryKey
    -
    IndexedDB.Key Primary key.
    +
    IndexedDB.Key Primary key.
    value
    -
    Runtime.RemoteObject Value.
    +
    Runtime.RemoteObject Value.
    -
    -

    IndexedDB.KeyPath Type

    +
    +

    IndexedDB.KeyPath Type

    Key path.

    type
    -
    ( null | string | array ) Key path type.
    +
    ( null | string | array ) Key path type.
    string (optional)
    -
    String String value.
    +
    String String value.
    array (optional)
    -
    [String] Array value.
    +
    [String] Array value.
    -
    -

    IndexedDB.enable Command

    +
    +

    IndexedDB.enable Command

    Enables events from backend.

    Code Example:

    @@ -3796,8 +3938,8 @@ 

    Code Example:

    IndexedDB.enable();
    -
    -

    IndexedDB.disable Command

    +
    +

    IndexedDB.disable Command

    Disables events from backend.

    Code Example:

    @@ -3805,14 +3947,14 @@ 

    Code Example:

    IndexedDB.disable();
    -
    -

    IndexedDB.requestDatabaseNamesForFrame Command

    +
    +

    IndexedDB.requestDatabaseNamesForFrame Command

    Requests database names for given frame's security origin.

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    frameId
    -
    Network.FrameId Frame id.
    +
    Network.FrameId Frame id.

    Code Example:

    @@ -3820,16 +3962,16 @@ 

    Code Example:

    IndexedDB.requestDatabaseNamesForFrame(requestId, frameId);
    -
    -

    IndexedDB.requestDatabase Command

    +
    +

    IndexedDB.requestDatabase Command

    Requests database with given name in given frame.

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    frameId
    -
    Network.FrameId Frame id.
    +
    Network.FrameId Frame id.
    databaseName
    -
    String Database name.
    +
    String Database name.

    Code Example:

    @@ -3837,26 +3979,26 @@ 

    Code Example:

    IndexedDB.requestDatabase(requestId, frameId, databaseName);
    -
    -

    IndexedDB.requestData Command

    +
    +

    IndexedDB.requestData Command

    Requests data from object store or index.

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    frameId
    -
    Network.FrameId Frame id.
    +
    Network.FrameId Frame id.
    databaseName
    -
    String Database name.
    +
    String Database name.
    objectStoreName
    -
    String Object store name.
    +
    String Object store name.
    indexName
    -
    String Index name, empty string for object store data requests.
    +
    String Index name, empty string for object store data requests.
    skipCount
    -
    Integer Number of records to skip.
    +
    Integer Number of records to skip.
    pageSize
    -
    Integer Number of records to fetch.
    +
    Integer Number of records to fetch.
    keyRange (optional)
    -
    IndexedDB.KeyRange Key range.
    +
    IndexedDB.KeyRange Key range.

    Code Example:

    @@ -3864,13 +4006,13 @@ 

    Code Example:

    IndexedDB.requestData(requestId, frameId, databaseName, objectStoreName, indexName, skipCount, pageSize, keyRange);
    -
    -

    IndexedDB.databaseNamesLoaded Event

    +
    +

    IndexedDB.databaseNamesLoaded Event

    requestId
    -
    Number Request id.
    +
    Number Request id.
    securityOriginWithDatabaseNames
    -
    IndexedDB.SecurityOriginWithDatabaseNames Frame with database names.
    +
    IndexedDB.SecurityOriginWithDatabaseNames Frame with database names.

    Code Example:

    @@ -3880,13 +4022,13 @@ 

    Code Example:

    }
    -
    -

    IndexedDB.databaseLoaded Event

    +
    +

    IndexedDB.databaseLoaded Event

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    databaseWithObjectStores
    -
    IndexedDB.DatabaseWithObjectStores Database with an array of object stores.
    +
    IndexedDB.DatabaseWithObjectStores Database with an array of object stores.

    Code Example:

    @@ -3896,15 +4038,15 @@ 

    Code Example:

    }
    -
    -

    IndexedDB.objectStoreDataLoaded Event

    +
    +

    IndexedDB.objectStoreDataLoaded Event

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    objectStoreDataEntries
    -
    [IndexedDB.DataEntry] Array of object store data entries.
    +
    [IndexedDB.DataEntry] Array of object store data entries.
    hasMore
    -
    Boolean If true, there are more entries to fetch in the given range.
    +
    Boolean If true, there are more entries to fetch in the given range.

    Code Example:

    @@ -3914,15 +4056,15 @@ 

    Code Example:

    }
    -
    -

    IndexedDB.indexDataLoaded Event

    +
    +

    IndexedDB.indexDataLoaded Event

    requestId
    -
    Integer Request id.
    +
    Integer Request id.
    indexDataEntries
    -
    [IndexedDB.DataEntry] Array of index data entries.
    +
    [IndexedDB.DataEntry] Array of index data entries.
    hasMore
    -
    Boolean If true, there are more entries to fetch in the given range.
    +
    Boolean If true, there are more entries to fetch in the given range.

    Code Example:

    @@ -3933,23 +4075,21 @@ 

    Code Example:

    -
    +

    Inspector

    -Command +Command -Event +Event -
    -

    Inspector.enable Command

    +
    +

    Inspector.enable Command

    Enables inspector domain notifications.

    Code Example:

    @@ -3957,8 +4097,8 @@ 

    Code Example:

    Inspector.enable();
    -
    -

    Inspector.disable Command

    +
    +

    Inspector.disable Command

    Disables inspector domain notifications.

    Code Example:

    @@ -3966,8 +4106,8 @@ 

    Code Example:

    Inspector.disable();
    -
    -

    Inspector.evaluateForTestInFrontend Event

    +
    +

    Inspector.evaluateForTestInFrontend Event

    testCallId
    Integer
    @@ -3982,11 +4122,11 @@

    Code Example:

    }
    -
    -

    Inspector.inspect Event

    +
    +

    Inspector.inspect Event

    object
    -
    Runtime.RemoteObject
    +
    Runtime.RemoteObject
    hints
    Object
    @@ -3998,57 +4138,25 @@

    Code Example:

    }
    -
    -

    Inspector.didCreateWorker Event

    -
    -
    id
    -
    Integer
    -
    url
    -
    String
    -
    isShared
    -
    Boolean
    -
    -

    Code Example:

    -
    -// WebInspector Event: Inspector.didCreateWorker
    -function onDidCreateWorker(res) {
    -	// res = {id, url, isShared}
    -}
    -
    -
    -
    -

    Inspector.didDestroyWorker Event

    -
    -
    id
    -
    Integer
    -
    -

    Code Example:

    -
    -// WebInspector Event: Inspector.didDestroyWorker
    -function onDidDestroyWorker(res) {
    -	// res = {id}
    -}
    -
    -
    -
    +

    Memory

    -Type +Type -Command +Command -
    -

    Memory.NodeCount Type

    +
    +

    Memory.NodeCount Type

    Number of nodes with given name.

    nodeName
    @@ -4057,8 +4165,8 @@

    Memory.NodeCount Type

    Integer
    -
    -

    Memory.ListenerCount Type

    +
    +

    Memory.ListenerCount Type

    Number of JS event listeners by event type.

    type
    @@ -4067,8 +4175,8 @@

    Memory.ListenerCount Type

    Integer
    -
    -

    Memory.StringStatistics Type

    +
    +

    Memory.StringStatistics Type

    Character data statistics for the page.

    dom
    @@ -4079,8 +4187,8 @@

    Memory.StringStatistics Type

    Integer
    -
    -

    Memory.DOMGroup Type

    +
    +

    Memory.DOMGroup Type

    size
    Integer
    @@ -4089,30 +4197,30 @@

    Memory.DOMGroup Type

    documentURI (optional)
    String
    nodeCount
    -
    [Memory.NodeCount]
    +
    [Memory.NodeCount]
    listenerCount
    -
    [Memory.ListenerCount]
    +
    [Memory.ListenerCount]
    -
    -

    Memory.MemoryBlock Type

    +
    +

    Memory.MemoryBlock Type

    size (optional)
    -
    Number Size of the block in bytes if available
    +
    Number Size of the block in bytes if available
    name
    -
    String Unique name used to identify the component that allocated this block
    +
    String Unique name used to identify the component that allocated this block
    children (optional)
    -
    [Memory.MemoryBlock]
    +
    [Memory.MemoryBlock]
    -
    -

    Memory.getDOMNodeCount Command

    +
    +

    Memory.getDOMNodeCount Command

    Callback Parameters:

    domGroups
    -
    [Memory.DOMGroup]
    +
    [Memory.DOMGroup]
    strings
    -
    Memory.StringStatistics
    +
    Memory.StringStatistics

    Code Example:

    @@ -4122,12 +4230,12 @@ 

    Code Example:

    });
    -
    -

    Memory.getProcessMemoryDistribution Command

    +
    +

    Memory.getProcessMemoryDistribution Command

    Callback Parameters:

    distribution
    -
    Memory.MemoryBlock An object describing all memory allocated by the process
    +
    Memory.MemoryBlock An object describing all memory allocated by the process

    Code Example:

    @@ -4138,227 +4246,227 @@ 

    Code Example:

    -
    +

    Network

    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.

    -Type +Type -Command +Command -Event +Event -
    -

    Network.LoaderId Type

    +
    +

    Network.LoaderId Type

    Unique loader identifier.

    String
    -
    -

    Network.FrameId Type

    +
    +

    Network.FrameId Type

    Unique frame identifier.

    String
    -
    -

    Network.RequestId Type

    +
    +

    Network.RequestId Type

    Unique request identifier.

    String
    -
    -

    Network.Timestamp Type

    +
    +

    Network.Timestamp Type

    Number of seconds since epoch.

    Number
    -
    -

    Network.Headers Type

    +
    +

    Network.Headers Type

    Request / response headers as keys / values of JSON object.

    -
    -

    Network.ResourceTiming Type

    +
    +

    Network.ResourceTiming Type

    Timing information for the request.

    requestTime
    -
    Number Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
    +
    Number Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
    proxyStart
    -
    Number Started resolving proxy.
    +
    Number Started resolving proxy.
    proxyEnd
    -
    Number Finished resolving proxy.
    +
    Number Finished resolving proxy.
    dnsStart
    -
    Number Started DNS address resolve.
    +
    Number Started DNS address resolve.
    dnsEnd
    -
    Number Finished DNS address resolve.
    +
    Number Finished DNS address resolve.
    connectStart
    -
    Number Started connecting to the remote host.
    +
    Number Started connecting to the remote host.
    connectEnd
    -
    Number Connected to the remote host.
    +
    Number Connected to the remote host.
    sslStart
    -
    Number Started SSL handshake.
    +
    Number Started SSL handshake.
    sslEnd
    -
    Number Finished SSL handshake.
    +
    Number Finished SSL handshake.
    sendStart
    -
    Number Started sending request.
    +
    Number Started sending request.
    sendEnd
    -
    Number Finished sending request.
    +
    Number Finished sending request.
    receiveHeadersEnd
    -
    Number Finished receiving response headers.
    +
    Number Finished receiving response headers.
    -
    -

    Network.Request Type

    +
    +

    Network.Request Type

    HTTP request data.

    url
    -
    String Request URL.
    +
    String Request URL.
    method
    -
    String HTTP request method.
    +
    String HTTP request method.
    headers
    -
    Network.Headers HTTP request headers.
    +
    Network.Headers HTTP request headers.
    postData (optional)
    -
    String HTTP POST request data.
    +
    String HTTP POST request data.
    -
    -

    Network.Response Type

    +
    +

    Network.Response Type

    HTTP response data.

    url
    -
    String Response URL.
    +
    String Response URL.
    status
    -
    Number HTTP response status code.
    +
    Number HTTP response status code.
    statusText
    -
    String HTTP response status text.
    +
    String HTTP response status text.
    headers
    -
    Network.Headers HTTP response headers.
    +
    Network.Headers HTTP response headers.
    headersText (optional)
    -
    String HTTP response headers text.
    +
    String HTTP response headers text.
    mimeType
    -
    String Resource mimeType as determined by the browser.
    +
    String Resource mimeType as determined by the browser.
    requestHeaders (optional)
    -
    Network.Headers Refined HTTP request headers that were actually transmitted over the network.
    +
    Network.Headers Refined HTTP request headers that were actually transmitted over the network.
    requestHeadersText (optional)
    -
    String HTTP request headers text.
    +
    String HTTP request headers text.
    connectionReused
    -
    Boolean Specifies whether physical connection was actually reused for this request.
    +
    Boolean Specifies whether physical connection was actually reused for this request.
    connectionId
    -
    Number Physical connection id that was actually used for this request.
    +
    Number Physical connection id that was actually used for this request.
    fromDiskCache (optional)
    -
    Boolean Specifies that the request was served from the disk cache.
    +
    Boolean Specifies that the request was served from the disk cache.
    timing (optional)
    -
    Network.ResourceTiming Timing information for the given request.
    +
    Network.ResourceTiming Timing information for the given request.
    -
    -

    Network.WebSocketRequest Type

    +
    +

    Network.WebSocketRequest Type

    WebSocket request data.

    requestKey3
    -
    String HTTP response status text.
    +
    String HTTP response status text.
    headers
    -
    Network.Headers HTTP response headers.
    +
    Network.Headers HTTP response headers.
    -
    -

    Network.WebSocketResponse Type

    +
    +

    Network.WebSocketResponse Type

    WebSocket response data.

    status
    -
    Number HTTP response status code.
    +
    Number HTTP response status code.
    statusText
    -
    String HTTP response status text.
    +
    String HTTP response status text.
    headers
    -
    Network.Headers HTTP response headers.
    +
    Network.Headers HTTP response headers.
    challengeResponse
    -
    String Challenge response.
    +
    String Challenge response.
    -
    -

    Network.WebSocketFrame Type

    +
    +

    Network.WebSocketFrame Type

    WebSocket frame data.

    opcode
    -
    Number WebSocket frame opcode.
    +
    Number WebSocket frame opcode.
    mask
    -
    Boolean WebSocke frame mask.
    +
    Boolean WebSocke frame mask.
    payloadData
    -
    String WebSocke frame payload data.
    +
    String WebSocke frame payload data.
    -
    -

    Network.CachedResource Type

    +
    +

    Network.CachedResource Type

    Information about the cached resource.

    url
    -
    String Resource URL.
    +
    String Resource URL.
    type
    -
    Page.ResourceType Type of this resource.
    +
    Page.ResourceType Type of this resource.
    response (optional)
    -
    Network.Response Cached response data.
    +
    Network.Response Cached response data.
    bodySize
    -
    Number Cached response body size.
    +
    Number Cached response body size.
    -
    -

    Network.Initiator Type

    +
    +

    Network.Initiator Type

    Information about the request initiator.

    type
    -
    ( parser | script | other ) Type of this initiator.
    +
    ( parser | script | other ) Type of this initiator.
    stackTrace (optional)
    -
    Console.StackTrace Initiator JavaScript stack trace, set for Script only.
    +
    Console.StackTrace Initiator JavaScript stack trace, set for Script only.
    url (optional)
    -
    String Initiator URL, set for Parser type only.
    +
    String Initiator URL, set for Parser type only.
    lineNumber (optional)
    -
    Number Initiator line number, set for Parser type only.
    +
    Number Initiator line number, set for Parser type only.
    -
    -

    Network.enable Command

    +
    +

    Network.enable Command

    Enables network tracking, network events will now be delivered to the client.

    Code Example:

    @@ -4366,8 +4474,8 @@ 

    Code Example:

    Network.enable();
    -
    -

    Network.disable Command

    +
    +

    Network.disable Command

    Disables network tracking, prevents network events from being sent to the client.

    Code Example:

    @@ -4375,12 +4483,12 @@ 

    Code Example:

    Network.disable();
    -
    -

    Network.setUserAgentOverride Command

    +
    +

    Network.setUserAgentOverride Command

    Allows overriding user agent with the given string.

    userAgent
    -
    String User agent to use.
    +
    String User agent to use.

    Code Example:

    @@ -4388,12 +4496,12 @@ 

    Code Example:

    Network.setUserAgentOverride(userAgent);
    -
    -

    Network.setExtraHTTPHeaders Command

    +
    +

    Network.setExtraHTTPHeaders Command

    Specifies whether to always send extra HTTP headers with the requests from this page.

    headers
    -
    Network.Headers Map with extra HTTP headers.
    +
    Network.Headers Map with extra HTTP headers.

    Code Example:

    @@ -4401,19 +4509,19 @@ 

    Code Example:

    Network.setExtraHTTPHeaders(headers);
    -
    -

    Network.getResponseBody Command

    +
    +

    Network.getResponseBody Command

    Returns content served for the given request.

    requestId
    -
    Network.RequestId Identifier of the network request to get content for.
    +
    Network.RequestId Identifier of the network request to get content for.

    Callback Parameters:

    body
    -
    String Response body.
    +
    String Response body.
    base64Encoded
    -
    Boolean True, if content was sent as base64.
    +
    Boolean True, if content was sent as base64.

    Code Example:

    @@ -4423,13 +4531,13 @@ 

    Code Example:

    });
    -
    -

    Network.canClearBrowserCache Command

    +
    +

    Network.canClearBrowserCache Command

    Tells whether clearing browser cache is supported.

    Callback Parameters:

    result
    -
    Boolean True if browser cache can be cleared.
    +
    Boolean True if browser cache can be cleared.

    Code Example:

    @@ -4439,8 +4547,8 @@ 

    Code Example:

    });
    -
    -

    Network.clearBrowserCache Command

    +
    +

    Network.clearBrowserCache Command

    Clears browser cache.

    Code Example:

    @@ -4448,13 +4556,13 @@ 

    Code Example:

    Network.clearBrowserCache();
    -
    -

    Network.canClearBrowserCookies Command

    +
    +

    Network.canClearBrowserCookies Command

    Tells whether clearing browser cookies is supported.

    Callback Parameters:

    result
    -
    Boolean True if browser cookies can be cleared.
    +
    Boolean True if browser cookies can be cleared.

    Code Example:

    @@ -4464,8 +4572,8 @@ 

    Code Example:

    });
    -
    -

    Network.clearBrowserCookies Command

    +
    +

    Network.clearBrowserCookies Command

    Clears browser cookies.

    Code Example:

    @@ -4473,12 +4581,12 @@ 

    Code Example:

    Network.clearBrowserCookies();
    -
    -

    Network.setCacheDisabled Command

    +
    +

    Network.setCacheDisabled Command

    Toggles ignoring cache for each request. If true, cache will not be used.

    cacheDisabled
    -
    Boolean Cache disabled state.
    +
    Boolean Cache disabled state.

    Code Example:

    @@ -4486,26 +4594,26 @@ 

    Code Example:

    Network.setCacheDisabled(cacheDisabled);
    -
    -

    Network.requestWillBeSent Event

    +
    +

    Network.requestWillBeSent Event

    Fired when page is about to send HTTP request.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    frameId
    -
    Network.FrameId Frame identifier.
    +
    Network.FrameId Frame identifier.
    loaderId
    -
    Network.LoaderId Loader identifier.
    +
    Network.LoaderId Loader identifier.
    documentURL
    -
    String URL of the document this request is loaded for.
    +
    String URL of the document this request is loaded for.
    request
    -
    Network.Request Request data.
    +
    Network.Request Request data.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    initiator
    -
    Network.Initiator Request initiator.
    +
    Network.Initiator Request initiator.
    redirectResponse (optional)
    -
    Network.Response Redirect response data.
    +
    Network.Response Redirect response data.

    Code Example:

    @@ -4515,12 +4623,12 @@ 

    Code Example:

    }
    -
    -

    Network.requestServedFromCache Event

    +
    +

    Network.requestServedFromCache Event

    Fired if request ended up loading from cache.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.

    Code Example:

    @@ -4530,22 +4638,22 @@ 

    Code Example:

    }
    -
    -

    Network.responseReceived Event

    +
    +

    Network.responseReceived Event

    Fired when HTTP response is available.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    frameId
    -
    Network.FrameId Frame identifier.
    +
    Network.FrameId Frame identifier.
    loaderId
    -
    Network.LoaderId Loader identifier.
    +
    Network.LoaderId Loader identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    type
    -
    Page.ResourceType Resource type.
    +
    Page.ResourceType Resource type.
    response
    -
    Network.Response Response data.
    +
    Network.Response Response data.

    Code Example:

    @@ -4555,18 +4663,18 @@ 

    Code Example:

    }
    -
    -

    Network.dataReceived Event

    +
    +

    Network.dataReceived Event

    Fired when data chunk was received over the network.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    dataLength
    -
    Integer Data chunk length.
    +
    Integer Data chunk length.
    encodedDataLength
    -
    Integer Actual bytes received (might be less than dataLength for compressed encodings).
    +
    Integer Actual bytes received (might be less than dataLength for compressed encodings).

    Code Example:

    @@ -4576,14 +4684,14 @@ 

    Code Example:

    }
    -
    -

    Network.loadingFinished Event

    +
    +

    Network.loadingFinished Event

    Fired when HTTP request has finished loading.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.

    Code Example:

    @@ -4593,18 +4701,18 @@ 

    Code Example:

    }
    -
    -

    Network.loadingFailed Event

    +
    +

    Network.loadingFailed Event

    Fired when HTTP request has failed to load.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    errorText
    -
    String User friendly error message.
    +
    String User friendly error message.
    canceled (optional)
    -
    Boolean True if loading was canceled.
    +
    Boolean True if loading was canceled.

    Code Example:

    @@ -4614,24 +4722,24 @@ 

    Code Example:

    }
    -
    -

    Network.requestServedFromMemoryCache Event

    +
    +

    Network.requestServedFromMemoryCache Event

    Fired when HTTP request has been served from memory cache.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    frameId
    -
    Network.FrameId Frame identifier.
    +
    Network.FrameId Frame identifier.
    loaderId
    -
    Network.LoaderId Loader identifier.
    +
    Network.LoaderId Loader identifier.
    documentURL
    -
    String URL of the document this request is loaded for.
    +
    String URL of the document this request is loaded for.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    initiator
    -
    Network.Initiator Request initiator.
    +
    Network.Initiator Request initiator.
    resource
    -
    Network.CachedResource Cached resource data.
    +
    Network.CachedResource Cached resource data.

    Code Example:

    @@ -4641,16 +4749,16 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketWillSendHandshakeRequest Event

    +
    +

    Network.webSocketWillSendHandshakeRequest Event

    Fired when WebSocket is about to initiate handshake.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    request
    -
    Network.WebSocketRequest WebSocket request data.
    +
    Network.WebSocketRequest WebSocket request data.

    Code Example:

    @@ -4660,16 +4768,16 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketHandshakeResponseReceived Event

    +
    +

    Network.webSocketHandshakeResponseReceived Event

    Fired when WebSocket handshake response becomes available.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    response
    -
    Network.WebSocketResponse WebSocket response data.
    +
    Network.WebSocketResponse WebSocket response data.

    Code Example:

    @@ -4679,14 +4787,14 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketCreated Event

    +
    +

    Network.webSocketCreated Event

    Fired upon WebSocket creation.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    url
    -
    String WebSocket request URL.
    +
    String WebSocket request URL.

    Code Example:

    @@ -4696,14 +4804,14 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketClosed Event

    +
    +

    Network.webSocketClosed Event

    Fired when WebSocket is closed.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.

    Code Example:

    @@ -4713,16 +4821,16 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketFrameReceived Event

    +
    +

    Network.webSocketFrameReceived Event

    Fired when WebSocket frame is received.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    response
    -
    Network.WebSocketFrame WebSocket response data.
    +
    Network.WebSocketFrame WebSocket response data.

    Code Example:

    @@ -4732,16 +4840,16 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketFrameError Event

    +
    +

    Network.webSocketFrameError Event

    Fired when WebSocket frame error occurs.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    errorMessage
    -
    String WebSocket frame error message.
    +
    String WebSocket frame error message.

    Code Example:

    @@ -4751,16 +4859,16 @@ 

    Code Example:

    }
    -
    -

    Network.webSocketFrameSent Event

    +
    +

    Network.webSocketFrameSent Event

    Fired when WebSocket frame is sent.

    requestId
    -
    Network.RequestId Request identifier.
    +
    Network.RequestId Request identifier.
    timestamp
    -
    Network.Timestamp Timestamp.
    +
    Network.Timestamp Timestamp.
    response
    -
    Network.WebSocketFrame WebSocket response data.
    +
    Network.WebSocketFrame WebSocket response data.

    Code Example:

    @@ -4771,141 +4879,144 @@ 

    Code Example:

    -
    +

    Page

    Actions and events related to the inspected page belong to the page domain.

    -Type +Type -Command +Command -Event +Event -
    -

    Page.ResourceType Type

    +
    +

    Page.ResourceType Type

    Resource type as it was perceived by the rendering engine.

    ( Document | Stylesheet | Image | Font | Script | XHR | WebSocket | Other )
    -
    -

    Page.Frame Type

    +
    +

    Page.Frame Type

    Information about the Frame on the page.

    id
    -
    String Frame unique identifier.
    +
    String Frame unique identifier.
    parentId (optional)
    -
    String Parent frame identifier.
    +
    String Parent frame identifier.
    loaderId
    -
    Network.LoaderId Identifier of the loader associated with this frame.
    +
    Network.LoaderId Identifier of the loader associated with this frame.
    name (optional)
    -
    String Frame's name as specified in the tag.
    +
    String Frame's name as specified in the tag.
    url
    -
    String Frame document's URL.
    +
    String Frame document's URL.
    securityOrigin (optional)
    -
    String Frame document's security origin.
    +
    String Frame document's security origin.
    mimeType
    -
    String Frame document's mimeType as determined by the browser.
    +
    String Frame document's mimeType as determined by the browser.
    -
    -

    Page.FrameResourceTree Type

    +
    +

    Page.FrameResourceTree Type

    Information about the Frame hierarchy along with their cached resources.

    frame
    -
    Page.Frame Frame information for this tree item.
    +
    Page.Frame Frame information for this tree item.
    childFrames (optional)
    -
    [Page.FrameResourceTree] Child frames.
    +
    [Page.FrameResourceTree] Child frames.
    resources
    -
    [Object] Information about frame resources.
    +
    [Object] Information about frame resources.
    -
    -

    Page.SearchMatch Type

    +
    +

    Page.SearchMatch Type

    Search match for resource.

    lineNumber
    -
    Number Line number in resource content.
    +
    Number Line number in resource content.
    lineContent
    -
    String Line with match content.
    +
    String Line with match content.
    -
    -

    Page.SearchResult Type

    +
    +

    Page.SearchResult Type

    Search result for resource.

    url
    -
    String Resource URL.
    +
    String Resource URL.
    frameId
    -
    Network.FrameId Resource frame id.
    +
    Network.FrameId Resource frame id.
    matchesCount
    -
    Number Number of matches in the resource content.
    +
    Number Number of matches in the resource content.
    -
    -
    +

    Profiler

    -Type +Type -Command +Command -Event +Event -
    -

    Profiler.ProfileHeader Type

    +
    +

    Profiler.ProfileHeader Type

    Profile header.

    typeId
    -
    ( CPU | CSS | HEAP ) Profile type name.
    +
    ( CPU | CSS | HEAP ) Profile type name.
    title
    -
    String Profile title.
    +
    String Profile title.
    uid
    -
    Integer Unique identifier of the profile.
    +
    Integer Unique identifier of the profile.
    maxJSObjectId (optional)
    -
    Integer Last seen JS object Id.
    +
    Integer Last seen JS object Id.
    -
    -

    Profiler.Profile Type

    +
    +

    Profiler.Profile Type

    Profile.

    head (optional)
    @@ -5317,15 +5470,15 @@

    Profiler.Profile Type

    Object
    -
    -

    Profiler.HeapSnapshotObjectId Type

    +
    +

    Profiler.HeapSnapshotObjectId Type

    Heap snashot object id.

    String
    -
    -

    Profiler.causesRecompilation Command

    +
    +

    Profiler.causesRecompilation Command

    Callback Parameters:

    result
    @@ -5339,8 +5492,8 @@

    Code Example:

    });
    -
    -

    Profiler.isSampling Command

    +
    +

    Profiler.isSampling Command

    Callback Parameters:

    result
    @@ -5354,8 +5507,8 @@

    Code Example:

    });
    -
    -

    Profiler.hasHeapProfiler Command

    +
    +

    Profiler.hasHeapProfiler Command

    Callback Parameters:

    result
    @@ -5369,44 +5522,44 @@

    Code Example:

    });
    -
    -

    Profiler.enable Command

    +
    +

    Profiler.enable Command

    Code Example:

     // WebInspector Command: Profiler.enable
     Profiler.enable();
     
    -
    -

    Profiler.disable Command

    +
    +

    Profiler.disable Command

    Code Example:

     // WebInspector Command: Profiler.disable
     Profiler.disable();
     
    -
    -

    Profiler.start Command

    +
    +

    Profiler.start Command

    Code Example:

     // WebInspector Command: Profiler.start
     Profiler.start();
     
    -
    -

    Profiler.stop Command

    +
    +

    Profiler.stop Command

    Code Example:

     // WebInspector Command: Profiler.stop
     Profiler.stop();
     
    -
    -

    Profiler.getProfileHeaders Command

    +
    +

    Profiler.getProfileHeaders Command

    Callback Parameters:

    headers
    -
    [Profiler.ProfileHeader]
    +
    [Profiler.ProfileHeader]

    Code Example:

    @@ -5416,8 +5569,8 @@ 

    Code Example:

    });
    -
    -

    Profiler.getProfile Command

    +
    +

    Profiler.getProfile Command

    type
    String
    @@ -5427,7 +5580,7 @@

    Profiler.getProfile Command

    Callback Parameters:

    profile
    -
    Profiler.Profile
    +
    Profiler.Profile

    Code Example:

    @@ -5437,8 +5590,8 @@ 

    Code Example:

    });
    -
    -

    Profiler.removeProfile Command

    +
    +

    Profiler.removeProfile Command

    type
    String
    @@ -5451,42 +5604,42 @@

    Code Example:

    Profiler.removeProfile(type, uid);
    -
    -

    Profiler.clearProfiles Command

    +
    +

    Profiler.clearProfiles Command

    Code Example:

     // WebInspector Command: Profiler.clearProfiles
     Profiler.clearProfiles();
     
    -
    -

    Profiler.takeHeapSnapshot Command

    +
    +

    Profiler.takeHeapSnapshot Command

    Code Example:

     // WebInspector Command: Profiler.takeHeapSnapshot
     Profiler.takeHeapSnapshot();
     
    -
    -

    Profiler.collectGarbage Command

    +
    +

    Profiler.collectGarbage Command

    Code Example:

     // WebInspector Command: Profiler.collectGarbage
     Profiler.collectGarbage();
     
    -
    -

    Profiler.getObjectByHeapObjectId Command

    +
    +

    Profiler.getObjectByHeapObjectId Command

    objectId
    -
    Profiler.HeapSnapshotObjectId
    +
    Profiler.HeapSnapshotObjectId
    objectGroup (optional)
    -
    String Symbolic group name that can be used to release multiple objects.
    +
    String Symbolic group name that can be used to release multiple objects.

    Callback Parameters:

    result
    -
    Runtime.RemoteObject Evaluation result.
    +
    Runtime.RemoteObject Evaluation result.

    Code Example:

    @@ -5496,16 +5649,16 @@ 

    Code Example:

    });
    -
    -

    Profiler.getHeapObjectId Command

    +
    +

    Profiler.getHeapObjectId Command

    objectId
    -
    Runtime.RemoteObjectId Identifier of the object to get heap object id for.
    +
    Runtime.RemoteObjectId Identifier of the object to get heap object id for.

    Callback Parameters:

    heapSnapshotObjectId
    -
    Profiler.HeapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.
    +
    Profiler.HeapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.

    Code Example:

    @@ -5515,11 +5668,11 @@ 

    Code Example:

    });
    -
    -

    Profiler.addProfileHeader Event

    +
    +

    Profiler.addProfileHeader Event

    header
    -
    Profiler.ProfileHeader
    +
    Profiler.ProfileHeader

    Code Example:

    @@ -5529,8 +5682,8 @@ 

    Code Example:

    }
    -
    -

    Profiler.addHeapSnapshotChunk Event

    +
    +

    Profiler.addHeapSnapshotChunk Event

    uid
    Integer
    @@ -5545,8 +5698,8 @@

    Code Example:

    }
    -
    -

    Profiler.finishHeapSnapshot Event

    +
    +

    Profiler.finishHeapSnapshot Event

    uid
    Integer
    @@ -5559,8 +5712,8 @@

    Code Example:

    }
    -
    -

    Profiler.setRecordingProfile Event

    +
    +

    Profiler.setRecordingProfile Event

    isProfiling
    Boolean
    @@ -5573,8 +5726,8 @@

    Code Example:

    }
    -
    -

    Profiler.resetProfiles Event

    +
    +

    Profiler.resetProfiles Event

    Code Example:

     // WebInspector Event: Profiler.resetProfiles
    @@ -5583,8 +5736,8 @@ 

    Code Example:

    }
    -
    -

    Profiler.reportHeapSnapshotProgress Event

    +
    +

    Profiler.reportHeapSnapshotProgress Event

    done
    Integer
    @@ -5600,133 +5753,133 @@

    Code Example:

    -
    +

    Runtime

    Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.

    -Type +Type -Command +Command
      -
    • Runtime.evaluate: Evaluates expression on global object.
    • -
    • Runtime.callFunctionOn: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
    • -
    • Runtime.getProperties: Returns properties of a given object. Object group of the result is inherited from the target object.
    • -
    • Runtime.releaseObject: Releases remote object with given id.
    • -
    • Runtime.releaseObjectGroup: Releases all remote objects that belong to a given group.
    • -
    • Runtime.run: Tells inspected instance(worker or page) that it can run in case it was started paused.
    • -
    • Runtime.setReportExecutionContextCreation: Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.
    • +
    • Runtime.evaluate: Evaluates expression on global object.
    • +
    • Runtime.callFunctionOn: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
    • +
    • Runtime.getProperties: Returns properties of a given object. Object group of the result is inherited from the target object.
    • +
    • Runtime.releaseObject: Releases remote object with given id.
    • +
    • Runtime.releaseObjectGroup: Releases all remote objects that belong to a given group.
    • +
    • Runtime.run: Tells inspected instance(worker or page) that it can run in case it was started paused.
    • +
    • Runtime.setReportExecutionContextCreation: Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.
    -Event +Event -
    -

    Runtime.RemoteObjectId Type

    +
    +

    Runtime.RemoteObjectId Type

    Unique object identifier.

    String
    -
    -

    Runtime.RemoteObject Type

    +
    +

    Runtime.RemoteObject Type

    Mirror object referencing original JavaScript object.

    type
    -
    ( object | function | undefined | string | number | boolean ) Object type.
    +
    ( object | function | undefined | string | number | boolean ) Object type.
    subtype (optional)
    -
    ( array | null | node | regexp | date ) Object subtype hint. Specified for object type values only.
    +
    ( array | null | node | regexp | date ) Object subtype hint. Specified for object type values only.
    className (optional)
    -
    String Object class (constructor) name. Specified for object type values only.
    +
    String Object class (constructor) name. Specified for object type values only.
    value (optional)
    -
    Any Remote object value (in case of primitive values or JSON values if it was requested).
    +
    Any Remote object value (in case of primitive values or JSON values if it was requested).
    description (optional)
    -
    String String representation of the object.
    +
    String String representation of the object.
    objectId (optional)
    -
    Runtime.RemoteObjectId Unique object identifier (for non-primitive values).
    +
    Runtime.RemoteObjectId Unique object identifier (for non-primitive values).
    -
    -

    Runtime.PropertyDescriptor Type

    +
    +

    Runtime.PropertyDescriptor Type

    Object property descriptor.

    name
    -
    String Property name.
    +
    String Property name.
    value (optional)
    -
    Runtime.RemoteObject The value associated with the property.
    +
    Runtime.RemoteObject The value associated with the property.
    writable (optional)
    -
    Boolean True if the value associated with the property may be changed (data descriptors only).
    +
    Boolean True if the value associated with the property may be changed (data descriptors only).
    get (optional)
    -
    Runtime.RemoteObject A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
    +
    Runtime.RemoteObject A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
    set (optional)
    -
    Runtime.RemoteObject A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).
    +
    Runtime.RemoteObject A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).
    configurable
    -
    Boolean True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
    +
    Boolean True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
    enumerable
    -
    Boolean True if this property shows up during enumeration of the properties on the corresponding object.
    +
    Boolean True if this property shows up during enumeration of the properties on the corresponding object.
    wasThrown (optional)
    -
    Boolean True if the result was thrown during the evaluation.
    +
    Boolean True if the result was thrown during the evaluation.
    -
    -

    Runtime.CallArgument Type

    +
    +

    Runtime.CallArgument Type

    Represents function call argument. Either remote object id objectId or primitive value or neither of (for undefined) them should be specified.

    value (optional)
    -
    Any Primitive value.
    +
    Any Primitive value.
    objectId (optional)
    -
    Runtime.RemoteObjectId Remote object handle.
    +
    Runtime.RemoteObjectId Remote object handle.
    -
    -

    Runtime.ExecutionContextId Type

    +
    +

    Runtime.ExecutionContextId Type

    Id of an execution context.

    Integer
    -
    -

    Runtime.ExecutionContextDescription Type

    +
    +

    Runtime.ExecutionContextDescription Type

    Description of an isolated world.

    id
    -
    Runtime.ExecutionContextId Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
    +
    Runtime.ExecutionContextId Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
    isPageContext
    -
    Boolean True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.
    +
    Boolean True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.
    name
    -
    String Human readable name describing given context.
    +
    String Human readable name describing given context.
    frameId
    -
    Network.FrameId Id of the owning frame.
    +
    Network.FrameId Id of the owning frame.
    -
    -

    Runtime.evaluate Command

    +
    +

    Runtime.evaluate Command

    Evaluates expression on global object.

    expression
    -
    String Expression to evaluate.
    +
    String Expression to evaluate.
    objectGroup (optional)
    -
    String Symbolic group name that can be used to release multiple objects.
    +
    String Symbolic group name that can be used to release multiple objects.
    includeCommandLineAPI (optional)
    -
    Boolean Determines whether Command Line API should be available during the evaluation.
    +
    Boolean Determines whether Command Line API should be available during the evaluation.
    doNotPauseOnExceptionsAndMuteConsole (optional)
    -
    Boolean Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.
    +
    Boolean Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.
    contextId (optional)
    -
    Runtime.ExecutionContextId Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify on of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
    +
    Runtime.ExecutionContextId Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
    returnByValue (optional)
    -
    Boolean Whether the result is expected to be a JSON object that should be sent by value.
    +
    Boolean Whether the result is expected to be a JSON object that should be sent by value.

    Callback Parameters:

    result
    -
    Runtime.RemoteObject Evaluation result.
    +
    Runtime.RemoteObject Evaluation result.
    wasThrown (optional)
    -
    Boolean True if the result was thrown during the evaluation.
    +
    Boolean True if the result was thrown during the evaluation.

    Code Example:

    @@ -5736,27 +5889,27 @@ 

    Code Example:

    });
    -
    -

    Runtime.callFunctionOn Command

    +
    +

    Runtime.callFunctionOn Command

    Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

    objectId
    -
    Runtime.RemoteObjectId Identifier of the object to call function on.
    +
    Runtime.RemoteObjectId Identifier of the object to call function on.
    functionDeclaration
    -
    String Declaration of the function to call.
    +
    String Declaration of the function to call.
    arguments (optional)
    -
    [Runtime.CallArgument] Call arguments. All call arguments must belong to the same JavaScript world as the target object.
    +
    [Runtime.CallArgument] Call arguments. All call arguments must belong to the same JavaScript world as the target object.
    doNotPauseOnExceptionsAndMuteConsole (optional)
    -
    Boolean Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.
    +
    Boolean Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.
    returnByValue (optional)
    -
    Boolean Whether the result is expected to be a JSON object which should be sent by value.
    +
    Boolean Whether the result is expected to be a JSON object which should be sent by value.

    Callback Parameters:

    result
    -
    Runtime.RemoteObject Call result.
    +
    Runtime.RemoteObject Call result.
    wasThrown (optional)
    -
    Boolean True if the result was thrown during the evaluation.
    +
    Boolean True if the result was thrown during the evaluation.

    Code Example:

    @@ -5766,19 +5919,19 @@ 

    Code Example:

    });
    -
    -

    Runtime.getProperties Command

    +
    +

    Runtime.getProperties Command

    Returns properties of a given object. Object group of the result is inherited from the target object.

    objectId
    -
    Runtime.RemoteObjectId Identifier of the object to return properties for.
    +
    Runtime.RemoteObjectId Identifier of the object to return properties for.
    ownProperties (optional)
    -
    Boolean If true, returns properties belonging only to the element itself, not to its prototype chain.
    +
    Boolean If true, returns properties belonging only to the element itself, not to its prototype chain.

    Callback Parameters:

    result
    -
    [Runtime.PropertyDescriptor] Object properties.
    +
    [Runtime.PropertyDescriptor] Object properties.

    Code Example:

    @@ -5788,12 +5941,12 @@ 

    Code Example:

    });
    -
    -

    Runtime.releaseObject Command

    +
    +

    Runtime.releaseObject Command

    Releases remote object with given id.

    objectId
    -
    Runtime.RemoteObjectId Identifier of the object to release.
    +
    Runtime.RemoteObjectId Identifier of the object to release.

    Code Example:

    @@ -5801,12 +5954,12 @@ 

    Code Example:

    Runtime.releaseObject(objectId);
    -
    -

    Runtime.releaseObjectGroup Command

    +
    +

    Runtime.releaseObjectGroup Command

    Releases all remote objects that belong to a given group.

    objectGroup
    -
    String Symbolic object group name.
    +
    String Symbolic object group name.

    Code Example:

    @@ -5814,8 +5967,8 @@ 

    Code Example:

    Runtime.releaseObjectGroup(objectGroup);
    -
    -

    Runtime.run Command

    +
    +

    Runtime.run Command

    Tells inspected instance(worker or page) that it can run in case it was started paused.

    Code Example:

    @@ -5823,12 +5976,12 @@ 

    Code Example:

    Runtime.run();
    -
    -

    Runtime.setReportExecutionContextCreation Command

    +
    +

    Runtime.setReportExecutionContextCreation Command

    Enables reporting about creation of isolated contexts by means of isolatedContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing isolated context.

    enabled
    -
    Boolean Reporting enabled state.
    +
    Boolean Reporting enabled state.

    Code Example:

    @@ -5836,12 +5989,12 @@ 

    Code Example:

    Runtime.setReportExecutionContextCreation(enabled);
    -
    -

    Runtime.isolatedContextCreated Event

    +
    +

    Runtime.isolatedContextCreated Event

    Issued when new isolated context is created.

    context
    -
    Runtime.ExecutionContextDescription A newly created isolated contex.
    +
    Runtime.ExecutionContextDescription A newly created isolated contex.

    Code Example:

    @@ -5852,42 +6005,42 @@ 

    Code Example:

    -
    +

    Timeline

    Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.

    -Type +Type -Command +Command -Event +Event -
    -

    Timeline.TimelineEvent Type

    +
    +

    Timeline.TimelineEvent Type

    Timeline record contains information about the recorded activity.

    type
    -
    String Event type.
    +
    String Event type.
    data
    -
    Object Event data.
    +
    Object Event data.
    children (optional)
    -
    [Timeline.TimelineEvent] Nested records.
    +
    [Timeline.TimelineEvent] Nested records.
    -
    -

    Timeline.start Command

    +
    +

    Timeline.start Command

    Starts capturing instrumentation events.

    maxCallStackDepth (optional)
    -
    Integer Samples JavaScript stack traces up to maxCallStackDepth, defaults to 5.
    +
    Integer Samples JavaScript stack traces up to maxCallStackDepth, defaults to 5.

    Code Example:

    @@ -5895,8 +6048,8 @@ 

    Code Example:

    Timeline.start(maxCallStackDepth);
    -
    -

    Timeline.stop Command

    +
    +

    Timeline.stop Command

    Stops capturing instrumentation events.

    Code Example:

    @@ -5904,12 +6057,12 @@ 

    Code Example:

    Timeline.stop();
    -
    -

    Timeline.setIncludeMemoryDetails Command

    +
    +

    Timeline.setIncludeMemoryDetails Command

    Starts calculating various DOM statistics and sending them as part of timeline events.

    enabled
    -
    Boolean True to start collecting DOM counters.
    +
    Boolean True to start collecting DOM counters.

    Code Example:

    @@ -5917,13 +6070,13 @@ 

    Code Example:

    Timeline.setIncludeMemoryDetails(enabled);
    -
    -

    Timeline.supportsFrameInstrumentation Command

    +
    +

    Timeline.supportsFrameInstrumentation Command

    Tells whether timeline agent supports frame instrumentation.

    Callback Parameters:

    result
    -
    Boolean True if timeline supports frame instrumentation.
    +
    Boolean True if timeline supports frame instrumentation.

    Code Example:

    @@ -5933,12 +6086,12 @@ 

    Code Example:

    });
    -
    -

    Timeline.eventRecorded Event

    +
    +

    Timeline.eventRecorded Event

    Fired for every instrumentation event while timeline is started.

    record
    -
    Timeline.TimelineEvent Timeline event record data.
    +
    Timeline.TimelineEvent Timeline event record data.

    Code Example:

    @@ -5949,16 +6102,16 @@ 

    Code Example:

    -
    +

    WebGL

    -Command +Command -
    -

    WebGL.enable Command

    +
    +

    WebGL.enable Command

    Enables WebGL inspection.

    Code Example:

    @@ -5966,8 +6119,8 @@ 

    Code Example:

    WebGL.enable();
    -
    -

    WebGL.disable Command

    +
    +

    WebGL.disable Command

    Disables WebGL inspection.

    Code Example:

    @@ -5976,26 +6129,26 @@ 

    Code Example:

    -
    +

    Worker

    -Command +Command -Event +Event -
    -

    Worker.setWorkerInspectionEnabled Command

    +
    +

    Worker.setWorkerInspectionEnabled Command

    value
    Boolean
    @@ -6006,8 +6159,8 @@

    Code Example:

    Worker.setWorkerInspectionEnabled(value);
    -
    -

    Worker.sendMessageToWorker Command

    +
    +

    Worker.sendMessageToWorker Command

    workerId
    Integer
    @@ -6020,8 +6173,8 @@

    Code Example:

    Worker.sendMessageToWorker(workerId, message);
    -
    -

    Worker.connectToWorker Command

    +
    +

    Worker.connectToWorker Command

    workerId
    Integer
    @@ -6032,8 +6185,8 @@

    Code Example:

    Worker.connectToWorker(workerId);
    -
    -

    Worker.disconnectFromWorker Command

    +
    +

    Worker.disconnectFromWorker Command

    workerId
    Integer
    @@ -6044,8 +6197,8 @@

    Code Example:

    Worker.disconnectFromWorker(workerId);
    -
    -

    Worker.setAutoconnectToWorkers Command

    +
    +

    Worker.setAutoconnectToWorkers Command

    value
    Boolean
    @@ -6056,8 +6209,8 @@

    Code Example:

    Worker.setAutoconnectToWorkers(value);
    -
    -

    Worker.workerCreated Event

    +
    +

    Worker.workerCreated Event

    workerId
    Integer
    @@ -6074,8 +6227,8 @@

    Code Example:

    }
    -
    -

    Worker.workerTerminated Event

    +
    +

    Worker.workerTerminated Event

    workerId
    Integer
    @@ -6088,8 +6241,8 @@

    Code Example:

    }
    -
    -

    Worker.dispatchMessageFromWorker Event

    +
    +

    Worker.dispatchMessageFromWorker Event

    workerId
    Integer
    @@ -6104,8 +6257,8 @@

    Code Example:

    }
    -
    -

    Worker.disconnectedFromWorker Event

    +
    +

    Worker.disconnectedFromWorker Event

    Code Example:

     // WebInspector Event: Worker.disconnectedFromWorker
    @@ -6117,8 +6270,8 @@ 

    Code Example:

    -

    Generated from Inspector.json v1.0 on 2012-06-26 16:53:00+0200

    -

    Implementation by Jonathan Diehl

    +

    Generated from Inspector.json v1.0 on 2012-07-31 17:15:22+0200

    +

    Implementation by Jonathan Diehl

    From 0d045ecb38224ed0709d1cd50933311bf5b2f8b6 Mon Sep 17 00:00:00 2001 From: Joel Brandt Date: Sun, 19 Aug 2012 07:54:44 -0700 Subject: [PATCH 12/20] jslint cleanup --- src/LiveDevelopment/Agents/GotoAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index 467f17d23df..df8cc96eda4 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -142,7 +142,7 @@ define(function GotoAgent(require, exports, module) { codeMirror.setCursor(location); editor.focus(); - if (! noFlash) { + if (!noFlash) { codeMirror.setLineClass(location.line, "flash"); window.setTimeout(codeMirror.setLineClass.bind(codeMirror, location.line), 1000); } From 8f36b0cafb77aa39f69aa9e2e1f5cdb783154ab4 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Wed, 22 Aug 2012 15:46:27 +0200 Subject: [PATCH 13/20] simplified the changes --- src/LiveDevelopment/Documents/CSSDocument.js | 2 ++ src/LiveDevelopment/Documents/HTMLDocument.js | 2 ++ src/LiveDevelopment/Documents/JSDocument.js | 1 + src/LiveDevelopment/main.js | 1 + 4 files changed, 6 insertions(+) diff --git a/src/LiveDevelopment/Documents/CSSDocument.js b/src/LiveDevelopment/Documents/CSSDocument.js index 53e7160c427..241f5c09f75 100644 --- a/src/LiveDevelopment/Documents/CSSDocument.js +++ b/src/LiveDevelopment/Documents/CSSDocument.js @@ -21,6 +21,7 @@ * */ + /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ @@ -149,6 +150,7 @@ define(function CSSDocumentModule(require, exports, module) { return null; }; + /** Event Handlers *******************************************************/ /** Triggered on cursor activity of the editor */ diff --git a/src/LiveDevelopment/Documents/HTMLDocument.js b/src/LiveDevelopment/Documents/HTMLDocument.js index bc453e12ab6..19736008588 100644 --- a/src/LiveDevelopment/Documents/HTMLDocument.js +++ b/src/LiveDevelopment/Documents/HTMLDocument.js @@ -21,6 +21,7 @@ * */ + /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ @@ -77,6 +78,7 @@ define(function HTMLDocumentModule(require, exports, module) { this.onHighlight(); }; + /** Event Handlers *******************************************************/ /** Triggered on cursor activity by the editor */ diff --git a/src/LiveDevelopment/Documents/JSDocument.js b/src/LiveDevelopment/Documents/JSDocument.js index 23ac3064e29..c6c6db29f58 100644 --- a/src/LiveDevelopment/Documents/JSDocument.js +++ b/src/LiveDevelopment/Documents/JSDocument.js @@ -21,6 +21,7 @@ * */ + /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global define, $ */ diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index 9ba48b7f21d..8185b312ee2 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -21,6 +21,7 @@ * */ + /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */ /*global brackets, define, $, less, window, XMLHttpRequest */ From 32b2c30b4c997b789e2a57fa2bfa5bb789765ea4 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Wed, 22 Aug 2012 15:46:39 +0200 Subject: [PATCH 14/20] Remove "Uncaught" from error messages --- src/LiveDevelopment/LiveDevelopment.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index 9f29601cb1e..3d94690af84 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -288,6 +288,11 @@ define(function LiveDevelopment(require, exports, module) { function _onError(event, error) { var message = error.message; + // Remove "Uncaught" from the beginning to avoid the inspector popping up + if (message.substr(0, 8) === "Uncaught") { + message = message.substr(9); + } + // Additional information, like exactly which parameter could not be processed. var data = error.data; if (Array.isArray(data)) { From bbeead17dba92a275e608d8057e3c82dadb244de Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Wed, 22 Aug 2012 16:14:05 +0200 Subject: [PATCH 15/20] made auto connect & experimental features optional --- src/LiveDevelopment/LiveDevelopment.js | 13 ++++++++----- src/LiveDevelopment/main.js | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index 3d94690af84..fa91b8f73e3 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -150,10 +150,10 @@ define(function LiveDevelopment(require, exports, module) { case "css": return CSSDocument; case "js": - return JSDocument; + return exports.config.experimental ? JSDocument : null; case "html": case "htm": - return HTMLDocument; + return exports.config.experimental ? HTMLDocument : null; default: return null; } @@ -245,6 +245,10 @@ define(function LiveDevelopment(require, exports, module) { /** Load the agents */ function loadAgents() { var name, promises = []; + if (exports.config.experimental) { + // load all agents + _enabledAgentNames = agents; + } for (name in _enabledAgentNames) { if (_enabledAgentNames.hasOwnProperty(name) && agents[name].load) { promises.push(agents[name].load()); @@ -351,12 +355,11 @@ define(function LiveDevelopment(require, exports, module) { // For Sprint 6, we only open live development connections for HTML files // FUTURE: Remove this test when we support opening connections for different // file types. - /* - if (!doc.extension || doc.extension.indexOf('htm') !== 0) { + + if (!exports.config.experimental && (!doc.extension || doc.extension.indexOf('htm') !== 0)) { showWrongDocError(); return promise; } - */ _setStatus(STATUS_CONNECTING); Inspector.connectToURL(doc.root.url).then(result.resolve, function onConnectFail(err) { diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index 8185b312ee2..96662f189fe 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -46,6 +46,7 @@ define(function main(require, exports, module) { Strings = require("strings"); var config = { + experimental: false, // enable experimental features debug: true, // enable debug output and helpers autoconnect: false, // go live automatically after startup? highlight: false, // enable highlighting? @@ -128,7 +129,9 @@ define(function main(require, exports, module) { // See the comments at the top of LiveDevelopment.js for details on the // various status codes. _setLabel(_$btnGoLive, null, _statusStyle[status + 1], _statusTooltip[status + 1]); - window.sessionStorage.setItem("live.enabled", status === 3); + if (config.autoconnect) { + window.sessionStorage.setItem("live.enabled", status === 3); + } }); // Initialize tooltip for 'not connected' state @@ -154,15 +157,6 @@ define(function main(require, exports, module) { } } - /** Setup autostarting of the live development connection */ - function _setupAutoStart() { - brackets.ready(function () { - if (DocumentManager.getCurrentDocument()) { - _handleGoLiveCommand(); - } - }); - } - /** Setup window references to useful LiveDevelopment modules */ function _setupDebugHelpers() { window.ld = LiveDevelopment; @@ -180,8 +174,14 @@ define(function main(require, exports, module) { if (config.debug) { _setupDebugHelpers(); } - if (window.sessionStorage.getItem("live.enabled") === "true") { - _setupAutoStart(); + + // trigger autoconnect + if (config.autoconnect && window.sessionStorage.getItem("live.enabled") === "true") { + brackets.ready(function () { + if (DocumentManager.getCurrentDocument()) { + _handleGoLiveCommand(); + } + }); } } window.setTimeout(init); From 4c10e24b9f991d24e2131d6aaa532e2f99ebdfbc Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Fri, 3 Aug 2012 12:27:15 +0200 Subject: [PATCH 16/20] add node events --- src/LiveDevelopment/Agents/GotoAgent.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index 39029401e1f..49109311a89 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -123,7 +123,13 @@ define(function GotoAgent(require, exports, module) { for (i in node.trace) { _makeJSTarget(targets, node.trace[i]); } - for (i in res.matchedCSSRules) { + for (i in node.events) { + var trace = node.events[i]; + if (trace.children.length > 0) { + _makeJSTarget(targets, trace.children[0].callFrames[0]); + } + } + for (i in res.matchedCSSRules.reverse()) { _makeCSSTarget(targets, res.matchedCSSRules[i]); } RemoteAgent.call("showGoto", targets); From 7ec6bed06a9175b01bea7e937d5ae5f93758e080 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Wed, 22 Aug 2012 16:38:24 +0200 Subject: [PATCH 17/20] removed trailing spaces --- src/LiveDevelopment/Agents/GotoAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index 49109311a89..ab3e3864de5 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -162,7 +162,7 @@ define(function GotoAgent(require, exports, module) { console.assert(url.substr(0, 7) === "file://", "Cannot open non-file URLs"); var result = new $.Deferred(); - + url = _urlWithoutQueryString(url); // Extract the path, also strip the third slash when on Windows var path = url.slice(brackets.platform === "win" ? 8 : 7); From 1067c9e3ff1364463f88cca3e3494b293c5f9b18 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Tue, 28 Aug 2012 08:25:28 +0200 Subject: [PATCH 18/20] made all agent loading more secure --- src/LiveDevelopment/LiveDevelopment.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index 0a3032baf6b..5dc3333de9f 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -247,12 +247,16 @@ define(function LiveDevelopment(require, exports, module) { /** Load the agents */ function loadAgents() { var name, promises = []; + var agentsToLoad; if (exports.config.experimental) { // load all agents - _enabledAgentNames = agents; + agentsToLoad = agents; + } else { + // load only enabled agents + agentsToLoad = _enabledAgentNames; } - for (name in _enabledAgentNames) { - if (_enabledAgentNames.hasOwnProperty(name) && agents[name].load) { + for (name in agentsToLoad) { + if (agentsToLoad.hasOwnProperty(name) && agents[name] && agents[name].load) { promises.push(agents[name].load()); _loadedAgentNames.push(name); } From e986c0dfb0b604483305e911bc9bd44da13aaf66 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Tue, 28 Aug 2012 08:31:14 +0200 Subject: [PATCH 19/20] switched to AppInit.appReady --- src/LiveDevelopment/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index 96662f189fe..ea847a9eea4 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -40,15 +40,16 @@ define(function main(require, exports, module) { var DocumentManager = require("document/DocumentManager"), Commands = require("command/Commands"), + AppInit = require("utils/AppInit"), LiveDevelopment = require("LiveDevelopment/LiveDevelopment"), Inspector = require("LiveDevelopment/Inspector/Inspector"), CommandManager = require("command/CommandManager"), Strings = require("strings"); var config = { - experimental: false, // enable experimental features + experimental: true, // enable experimental features debug: true, // enable debug output and helpers - autoconnect: false, // go live automatically after startup? + autoconnect: true, // go live automatically after startup? highlight: false, // enable highlighting? highlightConfig: { // the highlight configuration for the Inspector borderColor: {r: 255, g: 229, b: 153, a: 0.66}, @@ -177,7 +178,7 @@ define(function main(require, exports, module) { // trigger autoconnect if (config.autoconnect && window.sessionStorage.getItem("live.enabled") === "true") { - brackets.ready(function () { + AppInit.appReady(function () { if (DocumentManager.getCurrentDocument()) { _handleGoLiveCommand(); } From b5fb39f6b05c6747de1412a886332e8c556db026 Mon Sep 17 00:00:00 2001 From: Jonathan Diehl Date: Tue, 28 Aug 2012 17:12:13 +0200 Subject: [PATCH 20/20] disabled the experimental features --- src/LiveDevelopment/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LiveDevelopment/main.js b/src/LiveDevelopment/main.js index ea847a9eea4..23e887700ba 100644 --- a/src/LiveDevelopment/main.js +++ b/src/LiveDevelopment/main.js @@ -47,9 +47,9 @@ define(function main(require, exports, module) { Strings = require("strings"); var config = { - experimental: true, // enable experimental features + experimental: false, // enable experimental features debug: true, // enable debug output and helpers - autoconnect: true, // go live automatically after startup? + autoconnect: false, // go live automatically after startup? highlight: false, // enable highlighting? highlightConfig: { // the highlight configuration for the Inspector borderColor: {r: 255, g: 229, b: 153, a: 0.66},