diff --git a/src/LiveDevelopment/Agents/CSSAgent.js b/src/LiveDevelopment/Agents/CSSAgent.js
index f9095278a9c..bc25a1965da 100644
--- a/src/LiveDevelopment/Agents/CSSAgent.js
+++ b/src/LiveDevelopment/Agents/CSSAgent.js
@@ -34,12 +34,12 @@ define(function CSSAgent(require, exports, module) {
"use strict";
require("thirdparty/path-utils/path-utils.min");
-
+
var Inspector = require("LiveDevelopment/Inspector/Inspector");
var _load; // {$.Deferred} load promise
var _urlToStyle; // {url -> loaded} style definition
-
+
/**
* Create a canonicalized version of the given URL, stripping off query strings and hashes.
* @param {string} url the URL to canonicalize
@@ -50,7 +50,7 @@ define(function CSSAgent(require, exports, module) {
}
// WebInspector Event: Page.loadEventFired
- function _onLoadEventFired(res) {
+ function _onLoadEventFired(event, res) {
// res = {timestamp}
_urlToStyle = {};
Inspector.CSS.getAllStyleSheets(function onGetAllStyleSheets(res) {
@@ -69,7 +69,7 @@ define(function CSSAgent(require, exports, module) {
function styleForURL(url) {
return _urlToStyle[_canonicalize(url)];
}
-
+
/** Get a list of all loaded stylesheet files by URL */
function getStylesheetURLs() {
var urls = [], url;
@@ -89,7 +89,7 @@ define(function CSSAgent(require, exports, module) {
console.assert(style, "Style Sheet for document not loaded: " + doc.url);
Inspector.CSS.setStyleSheetText(style.styleSheetId, doc.getText());
}
-
+
/** Empties a CSS style sheet given a document that has been deleted
* @param {Document} document
*/
@@ -102,13 +102,13 @@ define(function CSSAgent(require, exports, module) {
/** Initialize the agent */
function load() {
_load = new $.Deferred();
- Inspector.on("Page.loadEventFired", _onLoadEventFired);
+ $(Inspector.Page).on("loadEventFired.CSSAgent", _onLoadEventFired);
return _load.promise();
}
/** Clean up */
function unload() {
- Inspector.off("Page.loadEventFired", _onLoadEventFired);
+ $(Inspector.Page).off(".CSSAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/ConsoleAgent.js b/src/LiveDevelopment/Agents/ConsoleAgent.js
index a58c646abc3..5cef3d90e7b 100644
--- a/src/LiveDevelopment/Agents/ConsoleAgent.js
+++ b/src/LiveDevelopment/Agents/ConsoleAgent.js
@@ -23,7 +23,7 @@
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
-/*global define */
+/*global define, $ */
/**
* ConsoleAgent forwards all console message from the remote console to the
@@ -53,14 +53,14 @@ define(function ConsoleAgent(require, exports, module) {
}
// WebInspector Event: Console.messageAdded
- function _onMessageAdded(res) {
+ function _onMessageAdded(event, res) {
// res = {message}
_lastMessage = res.message;
_log(_lastMessage);
}
// WebInspector Event: Console.messageRepeatCountUpdated
- function _onMessageRepeatCountUpdated(res) {
+ function _onMessageRepeatCountUpdated(event, res) {
// res = {count}
if (_lastMessage) {
_log(_lastMessage);
@@ -68,23 +68,22 @@ define(function ConsoleAgent(require, exports, module) {
}
// WebInspector Event: Console.messagesCleared
- function _onMessagesCleared(res) {
+ function _onMessagesCleared(event, res) {
// res = {}
}
/** Initialize the agent */
function load() {
Inspector.Console.enable();
- Inspector.on("Console.messageAdded", _onMessageAdded);
- Inspector.on("Console.messageRepeatCountUpdated", _onMessageRepeatCountUpdated);
- Inspector.on("Console.messagesCleared", _onMessagesCleared);
+ $(Inspector.Console)
+ .on("messageAdded.ConsoleAgent", _onMessageAdded)
+ .on("messageRepeatCountUpdated.ConsoleAgent", _onMessageRepeatCountUpdated)
+ .on("messagesCleared.ConsoleAgent", _onMessagesCleared);
}
/** Clean up */
function unload() {
- Inspector.off("Console.messageAdded", _onMessageAdded);
- Inspector.off("Console.messageRepeatCountUpdated", _onMessageRepeatCountUpdated);
- Inspector.off("Console.messagesCleared", _onMessagesCleared);
+ $(Inspector.Console).off(".ConsoleAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/DOMAgent.js b/src/LiveDevelopment/Agents/DOMAgent.js
index 5f676d807e9..ff1ae55db30 100644
--- a/src/LiveDevelopment/Agents/DOMAgent.js
+++ b/src/LiveDevelopment/Agents/DOMAgent.js
@@ -32,12 +32,14 @@
* the source document (replace [from,to] with text) call
* `applyChange(from, to, text)`.
*
- * The DOMAgent triggers `DOMAgent.getDocument` on Inspector once it has loaded
+ * The DOMAgent triggers `getDocument` once it has loaded
* the document.
*/
define(function DOMAgent(require, exports, module) {
"use strict";
+ var $exports = $(exports);
+
var Inspector = require("LiveDevelopment/Inspector/Inspector");
var RemoteAgent = require("LiveDevelopment/Agents/RemoteAgent");
var DOMNode = require("LiveDevelopment/Agents/DOMNode");
@@ -186,10 +188,10 @@ define(function DOMAgent(require, exports, module) {
}
// WebInspector Event: Page.loadEventFired
- function _onLoadEventFired(res) {
+ function _onLoadEventFired(event, res) {
// res = {timestamp}
Inspector.DOM.getDocument(function onGetDocument(res) {
- Inspector.trigger("DOMAgent.getDocument", res);
+ $exports.triggerHandler("getDocument", res);
// res = {root}
_idToNode = {};
_pendingRequests = 0;
@@ -198,18 +200,18 @@ define(function DOMAgent(require, exports, module) {
}
// WebInspector Event: Page.frameNavigated
- function _onFrameNavigated(res) {
+ function _onFrameNavigated(event, res) {
// res = {frame}
exports.url = _cleanURL(res.frame.url);
}
// WebInspector Event: DOM.documentUpdated
- function _onDocumentUpdated(res) {
+ function _onDocumentUpdated(event, res) {
// res = {}
}
// WebInspector Event: DOM.setChildNodes
- function _onSetChildNodes(res) {
+ function _onSetChildNodes(event, res) {
// res = {parentId, nodes}
var node = nodeWithId(res.parentId);
node.setChildrenPayload(res.nodes);
@@ -219,7 +221,7 @@ define(function DOMAgent(require, exports, module) {
}
// WebInspector Event: DOM.childNodeCountUpdated
- function _onChildNodeCountUpdated(res) {
+ function _onChildNodeCountUpdated(event, res) {
// res = {nodeId, childNodeCount}
if (res.nodeId > 0) {
Inspector.DOM.requestChildNodes(res.nodeId);
@@ -227,7 +229,7 @@ define(function DOMAgent(require, exports, module) {
}
// WebInspector Event: DOM.childNodeInserted
- function _onChildNodeInserted(res) {
+ function _onChildNodeInserted(event, res) {
// res = {parentNodeId, previousNodeId, node}
if (res.node.nodeId > 0) {
var parent = nodeWithId(res.parentNodeId);
@@ -238,7 +240,7 @@ define(function DOMAgent(require, exports, module) {
}
// WebInspector Event: DOM.childNodeRemoved
- function _onChildNodeRemoved(res) {
+ function _onChildNodeRemoved(event, res) {
// res = {parentNodeId, nodeId}
if (res.nodeId > 0) {
var node = nodeWithId(res.nodeId);
@@ -286,13 +288,15 @@ define(function DOMAgent(require, exports, module) {
/** Initialize the agent */
function load() {
_load = new $.Deferred();
- Inspector.on("Page.frameNavigated", _onFrameNavigated);
- Inspector.on("Page.loadEventFired", _onLoadEventFired);
- Inspector.on("DOM.documentUpdated", _onDocumentUpdated);
- Inspector.on("DOM.setChildNodes", _onSetChildNodes);
- Inspector.on("DOM.childNodeCountUpdated", _onChildNodeCountUpdated);
- Inspector.on("DOM.childNodeInserted", _onChildNodeInserted);
- Inspector.on("DOM.childNodeRemoved", _onChildNodeRemoved);
+ $(Inspector.Page)
+ .on("frameNavigated.DOMAgent", _onFrameNavigated)
+ .on("loadEventFired.DOMAgent", _onLoadEventFired);
+ $(Inspector.DOM)
+ .on("documentUpdated.DOMAgent", _onDocumentUpdated)
+ .on("setChildNodes.DOMAgent", _onSetChildNodes)
+ .on("childNodeCountUpdated.DOMAgent", _onChildNodeCountUpdated)
+ .on("childNodeInserted.DOMAgent", _onChildNodeInserted)
+ .on("childNodeRemoved.DOMAgent", _onChildNodeRemoved);
Inspector.Page.enable();
Inspector.Page.reload();
return _load.promise();
@@ -300,13 +304,8 @@ define(function DOMAgent(require, exports, module) {
/** Clean up */
function unload() {
- Inspector.off("Page.frameNavigated", _onFrameNavigated);
- Inspector.off("Page.loadEventFired", _onLoadEventFired);
- Inspector.off("DOM.documentUpdated", _onDocumentUpdated);
- Inspector.off("DOM.setChildNodes", _onSetChildNodes);
- Inspector.off("DOM.childNodeCountUpdated", _onChildNodeCountUpdated);
- Inspector.off("DOM.childNodeInserted", _onChildNodeInserted);
- Inspector.off("DOM.childNodeRemoved", _onChildNodeRemoved);
+ $(Inspector.Page).off(".DOMAgent");
+ $(Inspector.DOM).off(".DOMAgent");
}
// Export private functions
diff --git a/src/LiveDevelopment/Agents/EditAgent.js b/src/LiveDevelopment/Agents/EditAgent.js
index c867e9c711f..e0144a2c84a 100644
--- a/src/LiveDevelopment/Agents/EditAgent.js
+++ b/src/LiveDevelopment/Agents/EditAgent.js
@@ -75,7 +75,7 @@ define(function EditAgent(require, exports, module) {
}
// Remote Event: Go to the given source node
- function _onRemoteEdit(res) {
+ function _onRemoteEdit(event, res) {
// res = {nodeId, name, value}
var node = DOMAgent.nodeWithId(res.nodeId);
node = node.children[0];
@@ -90,7 +90,7 @@ define(function EditAgent(require, exports, module) {
var from = codeMirror.posFromIndex(node.location + change.from);
var to = codeMirror.posFromIndex(node.location + change.to);
editor.document.replaceRange(change.text, from, to);
-
+
var newPos = codeMirror.posFromIndex(node.location + change.from + change.text.length);
editor.setCursorPos(newPos.line, newPos.ch);
}
@@ -98,12 +98,12 @@ define(function EditAgent(require, exports, module) {
/** Initialize the agent */
function load() {
- Inspector.on("RemoteAgent.edit", _onRemoteEdit);
+ $(RemoteAgent).on("edit.EditAgent", _onRemoteEdit);
}
/** Initialize the agent */
function unload() {
- Inspector.off("RemoteAgent.edit", _onRemoteEdit);
+ $(RemoteAgent).off(".EditAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js
index 3189e5eed53..39029401e1f 100644
--- a/src/LiveDevelopment/Agents/GotoAgent.js
+++ b/src/LiveDevelopment/Agents/GotoAgent.js
@@ -112,7 +112,7 @@ define(function GotoAgent(require, exports, module) {
}
/** Gather options where to go to from the given source node */
- function _onRemoteShowGoto(res) {
+ function _onRemoteShowGoto(event, res) {
// res = {nodeId, name, value}
var node = DOMAgent.nodeWithId(res.nodeId);
@@ -177,7 +177,7 @@ define(function GotoAgent(require, exports, module) {
}
/** Go to the given source node */
- function _onRemoteGoto(res) {
+ function _onRemoteGoto(event, res) {
// res = {nodeId, name, value}
var location, url = res.value;
var matches = /^(.*):([^:]+)$/.exec(url);
@@ -195,14 +195,14 @@ define(function GotoAgent(require, exports, module) {
/** Initialize the agent */
function load() {
- Inspector.on("RemoteAgent.showgoto", _onRemoteShowGoto);
- Inspector.on("RemoteAgent.goto", _onRemoteGoto);
+ $(RemoteAgent)
+ .on("showgoto.GotoAgent", _onRemoteShowGoto)
+ .on("goto.GotoAgent", _onRemoteGoto);
}
/** Initialize the agent */
function unload() {
- Inspector.off("RemoteAgent.showgoto", _onRemoteShowGoto);
- Inspector.off("RemoteAgent.goto", _onRemoteGoto);
+ $(RemoteAgent).off(".GotoAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/HighlightAgent.js b/src/LiveDevelopment/Agents/HighlightAgent.js
index d9e7fca0286..3267e001e01 100644
--- a/src/LiveDevelopment/Agents/HighlightAgent.js
+++ b/src/LiveDevelopment/Agents/HighlightAgent.js
@@ -23,11 +23,13 @@
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
-/*global define */
+/*global define, $ */
/**
* HighlightAgent dispatches events for highlight requests from in-browser
* highlight requests, and allows highlighting nodes and rules in the browser.
+ *
+ * Trigger "highlight" when a node should be highlighted
*/
define(function HighlightAgent(require, exports, module) {
"use strict";
@@ -39,12 +41,12 @@ define(function HighlightAgent(require, exports, module) {
var _highlight; // active highlight
// Remote Event: Highlight
- function _onRemoteHighlight(res) {
+ function _onRemoteHighlight(event, res) {
var node;
if (res.value === "1") {
node = DOMAgent.nodeWithId(res.nodeId);
}
- Inspector.trigger("HighlightAgent.highlight", node);
+ $(exports).triggerHandler("highlight", node);
}
/** Hide in-browser highlighting */
@@ -103,12 +105,12 @@ define(function HighlightAgent(require, exports, module) {
/** Initialize the agent */
function load() {
_highlight = {};
- Inspector.on("RemoteAgent.highlight", _onRemoteHighlight);
+ $(RemoteAgent).on("highlight.HighlightAgent", _onRemoteHighlight);
}
/** Clean up */
function unload() {
- Inspector.off("RemoteAgent.highlight", _onRemoteHighlight);
+ $(RemoteAgent).off(".HighlightAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/NetworkAgent.js b/src/LiveDevelopment/Agents/NetworkAgent.js
index 9cabc7939da..aaafe461004 100644
--- a/src/LiveDevelopment/Agents/NetworkAgent.js
+++ b/src/LiveDevelopment/Agents/NetworkAgent.js
@@ -55,7 +55,7 @@ define(function NetworkAgent(require, exports, module) {
}
// WebInspector Event: Network.requestWillBeSent
- function _onRequestWillBeSent(res) {
+ function _onRequestWillBeSent(event, res) {
// res = {requestId, frameId, loaderId, documentURL, request, timestamp, initiator, stackTrace, redirectResponse}
var url = _urlWithoutQueryString(res.request.url);
_urlRequested[url] = true;
@@ -65,12 +65,12 @@ define(function NetworkAgent(require, exports, module) {
function load() {
_urlRequested = {};
Inspector.Network.enable();
- Inspector.on("Network.requestWillBeSent", _onRequestWillBeSent);
+ $(Inspector.Network).on("requestWillBeSent.NetworkAgent", _onRequestWillBeSent);
}
/** Unload the agent */
function unload() {
- Inspector.off("Network.requestWillBeSent", _onRequestWillBeSent);
+ $(Inspector.Network).off(".NetworkAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/RemoteAgent.js b/src/LiveDevelopment/Agents/RemoteAgent.js
index f00ab972880..04da263ddfa 100644
--- a/src/LiveDevelopment/Agents/RemoteAgent.js
+++ b/src/LiveDevelopment/Agents/RemoteAgent.js
@@ -28,19 +28,22 @@
/**
* RemoteAgent defines and provides an interface for custom remote functions
* loaded from RemoteFunctions. Remote commands are executed via
- * `call(name, varargs)`. Remote events are dispatched as events on the
- * Inspector named "Remote.EVENT".
+ * `call(name, varargs)`.
+ *
+ * Remote events are dispatched as events on this object.
*/
define(function RemoteAgent(require, exports, module) {
"use strict";
+ var $exports = $(exports);
+
var Inspector = require("LiveDevelopment/Inspector/Inspector");
var _load; // deferred load
var _objectId; // the object id of the remote object
// WebInspector Event: Page.loadEventFired
- function _onLoadEventFired(res) {
+ function _onLoadEventFired(event, res) {
// res = {timestamp}
var request = new XMLHttpRequest();
request.open("GET", "LiveDevelopment/Agents/RemoteFunctions.js");
@@ -56,11 +59,11 @@ define(function RemoteAgent(require, exports, module) {
}
// WebInspector Event: DOM.attributeModified
- function _onAttributeModified(res) {
+ function _onAttributeModified(event, res) {
// res = {nodeId, name, value}
var matches = /^data-ld-(.*)/.exec(res.name);
if (matches) {
- Inspector.trigger("RemoteAgent." + matches[1], res);
+ $exports.triggerHandler(matches[1], res);
}
}
@@ -103,15 +106,15 @@ define(function RemoteAgent(require, exports, module) {
/** Initialize the agent */
function load() {
_load = new $.Deferred();
- Inspector.on("Page.loadEventFired", _onLoadEventFired);
- Inspector.on("DOM.attributeModified", _onAttributeModified);
+ $(Inspector.Page).on("loadEventFired.RemoteAgent", _onLoadEventFired);
+ $(Inspector.DOM).on("attributeModified.RemoteAgent", _onAttributeModified);
return _load.promise();
}
/** Clean up */
function unload() {
- Inspector.off("Page.loadEventFired", _onLoadEventFired);
- Inspector.off("DOM.attributeModified", _onAttributeModified);
+ $(Inspector.Page).off(".RemoteAgent");
+ $(Inspector.DOM).off(".RemoteAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Agents/RemoteFunctions.js b/src/LiveDevelopment/Agents/RemoteFunctions.js
index 07006a94183..c7b17f49193 100644
--- a/src/LiveDevelopment/Agents/RemoteFunctions.js
+++ b/src/LiveDevelopment/Agents/RemoteFunctions.js
@@ -314,7 +314,7 @@ function RemoteFunctions() {
}
// install event listeners
-
+
/* FUTURE
window.document.addEventListener("keyup", _onKeyUp);
window.document.addEventListener("mousemove", _onMouse);
@@ -323,7 +323,7 @@ function RemoteFunctions() {
window.document.addEventListener("mouseup", _preventEventWhenMeta, true);
window.document.addEventListener("click", _onClick, true);
*/
-
+
return {
"showGoto": showGoto,
"hideHighlight": hideHighlight,
diff --git a/src/LiveDevelopment/Agents/ScriptAgent.js b/src/LiveDevelopment/Agents/ScriptAgent.js
index 3171351fb81..fa723785a0c 100644
--- a/src/LiveDevelopment/Agents/ScriptAgent.js
+++ b/src/LiveDevelopment/Agents/ScriptAgent.js
@@ -66,13 +66,13 @@ define(function ScriptAgent(require, exports, module) {
}
// DOMAgent Event: Document root loaded
- function _onGetDocument(res) {
+ function _onGetDocument(event, res) {
Inspector.DOMDebugger.setDOMBreakpoint(res.root.nodeId, "subtree-modified");
_load.resolve();
}
// WebInspector Event: DOM.childNodeInserted
- function _onChildNodeInserted(res) {
+ function _onChildNodeInserted(event, res) {
// res = {parentNodeId, previousNodeId, node}
if (_insertTrace) {
var node = DOMAgent.nodeWithId(res.node.nodeId);
@@ -83,19 +83,19 @@ define(function ScriptAgent(require, exports, module) {
// TODO: Strip off query/hash strings from URL (see CSSAgent._canonicalize())
// WebInspector Event: Debugger.scriptParsed
- function _onScriptParsed(res) {
+ function _onScriptParsed(event, res) {
// res = {scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL}
_idToScript[res.scriptId] = res;
_urlToScript[res.url] = res;
}
// WebInspector Event: Debugger.scriptFailedToParse
- function _onScriptFailedToParse(res) {
+ function _onScriptFailedToParse(event, res) {
// res = {url, scriptSource, startLine, errorLine, errorMessage}
}
// WebInspector Event: Debugger.paused
- function _onPaused(res) {
+ function _onPaused(event, res) {
// res = {callFrames, reason, data}
switch (res.reason) {
@@ -124,21 +124,20 @@ define(function ScriptAgent(require, exports, module) {
_load = new $.Deferred();
Inspector.Debugger.enable();
Inspector.Debugger.setPauseOnExceptions("uncaught");
- Inspector.on("DOMAgent.getDocument", _onGetDocument);
- Inspector.on("Debugger.scriptParsed", _onScriptParsed);
- Inspector.on("Debugger.scriptFailedToParse", _onScriptFailedToParse);
- Inspector.on("Debugger.paused", _onPaused);
- Inspector.on("DOM.childNodeInserted", _onChildNodeInserted);
+ $(DOMAgent).on("getDocument.ScriptAgent", _onGetDocument);
+ $(Inspector.Debugger)
+ .on("scriptParsed.ScriptAgent", _onScriptParsed)
+ .on("scriptFailedToParse.ScriptAgent", _onScriptFailedToParse)
+ .on("paused.ScriptAgent", _onPaused);
+ $(Inspector.DOM).on("childNodeInserted.ScriptAgent", _onChildNodeInserted);
return _load;
}
/** Clean up */
function unload() {
- Inspector.off("DOMAgent.getDocument", _onGetDocument);
- Inspector.off("Debugger.scriptParsed", _onScriptParsed);
- Inspector.off("Debugger.scriptFailedToParse", _onScriptFailedToParse);
- Inspector.off("Debugger.paused", _onPaused);
- Inspector.off("DOM.childNodeInserted", _onChildNodeInserted);
+ $(DOMAgent).off(".ScriptAgent");
+ $(Inspector.Debugger).off(".ScriptAgent");
+ $(Inspector.DOM).off(".ScriptAgent");
}
// Export public functions
diff --git a/src/LiveDevelopment/Documents/CSSDocument.js b/src/LiveDevelopment/Documents/CSSDocument.js
index 1f50a614c87..241f5c09f75 100644
--- a/src/LiveDevelopment/Documents/CSSDocument.js
+++ b/src/LiveDevelopment/Documents/CSSDocument.js
@@ -58,7 +58,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.
/*
@@ -66,9 +66,9 @@ define(function CSSDocumentModule(require, exports, module) {
this._highlight = [];
this.onHighlight = this.onHighlight.bind(this);
this.onCursorActivity = this.onCursorActivity.bind(this);
- Inspector.on("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).on("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 +89,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 +99,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 +109,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();
};
@@ -132,7 +132,7 @@ define(function CSSDocumentModule(require, exports, module) {
$(this.doc).off("deleted", this.onDeleted);
this.doc.releaseRef();
/*
- Inspector.off("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).off("highlight", this.onHighlight);
$(this.editor).off("cursorActivity", this.onCursorActivity);
this.onHighlight();
*/
@@ -176,7 +176,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..84ce63a6d2f 100644
--- a/src/LiveDevelopment/Documents/HTMLDocument.js
+++ b/src/LiveDevelopment/Documents/HTMLDocument.js
@@ -58,7 +58,7 @@ define(function HTMLDocumentModule(require, exports, module) {
this.onHighlight = this.onHighlight.bind(this);
this.onChange = this.onChange.bind(this);
this.onCursorActivity = this.onCursorActivity.bind(this);
- Inspector.on("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).on("highlight", this.onHighlight);
$(this.editor).on("change", this.onChange);
$(this.editor).on("cursorActivity", this.onCursorActivity);
this.onCursorActivity();
@@ -66,7 +66,7 @@ define(function HTMLDocumentModule(require, exports, module) {
/** Close the document */
HTMLDocument.prototype.close = function close() {
- Inspector.off("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).off("highlight", this.onHighlight);
$(this.editor).off("change", this.onChange);
$(this.editor).off("cursorActivity", this.onCursorActivity);
this.onHighlight();
diff --git a/src/LiveDevelopment/Documents/JSDocument.js b/src/LiveDevelopment/Documents/JSDocument.js
index d2cb2cbbd3c..120de1f48f4 100644
--- a/src/LiveDevelopment/Documents/JSDocument.js
+++ b/src/LiveDevelopment/Documents/JSDocument.js
@@ -60,7 +60,7 @@ define(function JSDocumentModule(require, exports, module) {
this.onHighlight = this.onHighlight.bind(this);
this.onChange = this.onChange.bind(this);
this.onCursorActivity = this.onCursorActivity.bind(this);
- Inspector.on("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).on("highlight", this.onHighlight);
$(this.editor).on("change", this.onChange);
$(this.editor).on("cursorActivity", this.onCursorActivity);
this.onCursorActivity();
@@ -68,7 +68,7 @@ define(function JSDocumentModule(require, exports, module) {
/** Close the document */
JSDocument.prototype.close = function close() {
- Inspector.off("HighlightAgent.highlight", this.onHighlight);
+ $(HighlightAgent).off("highlight", this.onHighlight);
$(this.editor).off("change", this.onChange);
$(this.editor).off("cursorActivity", this.onCursorActivity);
this.onHighlight();
diff --git a/src/LiveDevelopment/Inspector/Inspector.js b/src/LiveDevelopment/Inspector/Inspector.js
index 29c0435e926..1460df0992c 100644
--- a/src/LiveDevelopment/Inspector/Inspector.js
+++ b/src/LiveDevelopment/Inspector/Inspector.js
@@ -83,32 +83,14 @@
define(function Inspector(require, exports, module) {
"use strict";
+ // jQuery exports object for events
+ var $exports = $(exports);
+
var _messageId = 1; // id used for remote method calls, auto-incrementing
var _messageCallbacks = {}; // {id -> function} for remote method calls
- var _handlers = {}; // {name -> function} for attached event handlers
var _socket; // remote debugger WebSocket
var _connectDeferred; // The deferred connect
- /** Trigger an event handler
- * @param {function} event handler
- * @param {Array} arguments array
- */
- function _triggerHandler(handler, args) {
- handler.apply(undefined, args);
- }
-
- /** Trigger an event and all attached event handlers
- * All passed arguments after the name are passed on as parameters.
- * @param {string} event name
- */
- function trigger(name, res) {
- var i, handlers = _handlers[name];
- var args = Array.prototype.slice.call(arguments, 1);
- for (i in handlers) {
- window.setTimeout(_triggerHandler.bind(undefined, handlers[i], args));
- }
- }
-
/** Check a parameter value against the given signature
* This only checks for optional parameters, not types
* Type checking is complex because of $ref and done on the remote end anyways
@@ -138,7 +120,7 @@ define(function Inspector(require, exports, module) {
// off auto re-opening when a new HTML file is selected.
return;
}
-
+
console.assert(_socket, "You must connect to the WebSocket before sending messages.");
var id, callback, args, i, params = {};
@@ -164,17 +146,17 @@ define(function Inspector(require, exports, module) {
/** WebSocket did close */
function _onDisconnect() {
_socket = undefined;
- trigger("disconnect");
+ $exports.triggerHandler("disconnect");
}
/** WebSocket reported an error */
function _onError(error) {
- trigger("error", error);
+ $exports.triggerHandler("error", [error]);
}
/** WebSocket did open */
function _onConnect() {
- trigger("connect");
+ $exports.triggerHandler("connect");
}
/** Received message from the WebSocket
@@ -186,15 +168,18 @@ define(function Inspector(require, exports, module) {
*/
function _onMessage(message) {
var response = JSON.parse(message.data);
- trigger("message", response);
+ $exports.triggerHandler("message", [response]);
if (response.error) {
- trigger("error", response.error);
+ $exports.triggerHandler("error", [response.error]);
} else if (response.result) {
if (_messageCallbacks[response.id]) {
_messageCallbacks[response.id](response.result);
}
} else {
- trigger(response.method, response.params);
+ var domainAndMethod = response.method.split(".");
+ var domain = domainAndMethod[0];
+ var method = domainAndMethod[1];
+ $(exports[domain]).triggerHandler(method, response.params);
}
}
@@ -231,10 +216,7 @@ define(function Inspector(require, exports, module) {
* @param {function} handler function
*/
function on(name, handler) {
- if (!_handlers[name]) {
- _handlers[name] = [];
- }
- _handlers[name].push(handler);
+ $exports.on(name, handler);
}
/** Remove the given or all event handler(s) for the given event or remove all event handlers
@@ -242,18 +224,7 @@ define(function Inspector(require, exports, module) {
* @param {function} optional handler function
*/
function off(name, handler) {
- if (!name) {
- _handlers = {};
- } else if (!handler) {
- delete _handlers[name];
- } else {
- var i, handlers = _handlers[name];
- for (i in handlers) {
- if (handlers[i] === handler) {
- handlers.splice(i, 1);
- }
- }
- }
+ $exports.off(name, handler);
}
/** Disconnect from the remote debugger WebSocket */
@@ -344,7 +315,6 @@ define(function Inspector(require, exports, module) {
}
// Export public functions
- exports.trigger = trigger;
exports.getAvailableSockets = getAvailableSockets;
exports.on = on;
exports.off = off;
diff --git a/src/LiveDevelopment/Inspector/Inspector.json b/src/LiveDevelopment/Inspector/Inspector.json
index ba1d7bdc167..4e644dc5612 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" }
- ]
}
]
},
@@ -87,6 +73,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 +91,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 +178,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 +311,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 +336,74 @@
{ "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." }
+ ]
+ },
+ {
+ "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
+ },
+ {
+ "name": "setDeviceOrientationOverride",
+ "description": "Overrides the Device Orientation.",
+ "parameters": [
+ { "name": "alpha", "type": "number", "description": "Mock alpha"},
+ { "name": "beta", "type": "number", "description": "Mock beta"},
+ { "name": "gamma", "type": "number", "description": "Mock gamma"}
+ ],
+ "hidden": true
+ },
+ {
+ "name": "clearDeviceOrientationOverride",
+ "description": "Clears the overridden Device Orientation.",
+ "hidden": true
+ },
+ {
+ "name": "canOverrideDeviceOrientation",
+ "description": "Check the backend if Web Inspector can override the device orientation.",
+ "returns": [
+ { "name": "result", "type": "boolean", "description": "If true, setDeviceOrientationOverride
can safely be invoked on the agent." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "setTouchEmulationEnabled",
+ "parameters": [
+ { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }
+ ],
+ "description": "Toggles mouse event-based touch event emulation.",
+ "hidden": true
}
],
"events": [
@@ -377,7 +456,30 @@
{ "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for object
type values only." },
{ "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." },
{ "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }
+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
+ { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containsing abbreviated property values.", "hidden": true }
+ ]
+ },
+ {
+ "id": "ObjectPreview",
+ "type": "object",
+ "hidden": true,
+ "description": "Object containing abbreviated remote object value.",
+ "properties": [
+ { "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." },
+ { "name": "overflow", "type": "boolean", "description": "True iff some of the properties of the original did not fit." },
+ { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }
+ ]
+ },
+ {
+ "id": "PropertyPreview",
+ "type": "object",
+ "hidden": true,
+ "properties": [
+ { "name": "name", "type": "string", "description": "Property name." },
+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
+ { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for object
type values only." }
]
},
{
@@ -403,7 +505,26 @@
{ "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 +533,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 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": [
@@ -428,6 +549,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 +587,24 @@
"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."
}
]
},
@@ -540,7 +680,7 @@
"name": "addInspectedHeapObject",
"parameters": [
{ "name": "heapObjectId", "type": "integer" }
- ]
+ ]
}
],
"events": [
@@ -665,6 +805,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",
@@ -764,7 +915,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 +1015,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 +1052,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 +1088,7 @@
{
"name": "getDatabaseTableNames",
"parameters": [
- { "name": "databaseId", "type": "integer" }
+ { "name": "databaseId", "$ref": "DatabaseId" }
],
"returns": [
{ "name": "tableNames", "type": "array", "items": { "type": "string" } }
@@ -911,7 +1097,7 @@
{
"name": "executeSQL",
"parameters": [
- { "name": "databaseId", "type": "integer" },
+ { "name": "databaseId", "$ref": "DatabaseId" },
{ "name": "query", "type": "string" }
],
"returns": [
@@ -973,7 +1159,8 @@
"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": "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." }
]
},
@@ -983,7 +1170,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 +1201,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,16 +1297,29 @@
"domain": "DOMStorage",
"hidden": true,
"types": [
+ {
+ "id": "StorageId",
+ "type": "string",
+ "description": "Unique identifier of DOM storage entry.",
+ "hidden": true
+ },
{
"id": "Entry",
"type": "object",
"description": "DOM Storage entry.",
"hidden": true,
"properties": [
- { "name": "host", "type": "string", "description": "Domain name." },
+ { "name": "origin", "type": "string", "description": "Document origin." },
{ "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 +1334,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 +1354,7 @@
{
"name": "removeDOMStorageItem",
"parameters": [
- { "name": "storageId", "type": "integer" },
+ { "name": "storageId", "$ref": "StorageId" },
{ "name": "key", "type": "string" }
],
"returns": [
@@ -1160,9 +1370,9 @@
]
},
{
- "name": "updateDOMStorage",
+ "name": "domStorageUpdated",
"parameters": [
- { "name": "storageId", "type": "integer" }
+ { "name": "storageId", "$ref": "StorageId" }
]
}
]
@@ -1257,6 +1467,35 @@
{
"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." },
+ { "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." }
+ ],
+ "description": "Represents a browser side file or directory."
+ },
+ {
+ "id": "Metadata",
+ "type": "object",
+ "properties": [
+ { "name": "modificationTime", "type": "number", "description": "Modification time." },
+ { "name": "size", "type": "number", "description": "File size. This field is always zero for directories." }
+ ],
+ "description": "Represents metadata of a file or entry."
+ }
+ ],
"commands": [
{
"name": "enable",
@@ -1264,10 +1503,92 @@
},
{
"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."
+ },
+ {
+ "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": [
+ {
+ "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 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 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."
+ }
]
},
{
@@ -1589,14 +1910,6 @@
],
"description": "Moves node into the new container, places it before the given anchor."
},
- {
- "name": "setTouchEmulationEnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }
- ],
- "description": "Toggles mouse event-based touch event emulation.",
- "hidden": true
- },
{
"name": "undo",
"description": "Undoes the last performed action.",
@@ -1722,6 +2035,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 +2082,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 +2108,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." }
@@ -1807,6 +2128,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",
@@ -1814,7 +2143,7 @@
{ "name": "name", "type": "string", "description": "Computed style property name." },
{ "name": "value", "type": "string", "description": "Computed style property value." }
]
- },
+ },
{
"id": "CSSStyle",
"type": "object",
@@ -1840,7 +2169,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."
@@ -1876,6 +2204,29 @@
{ "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": "Region",
+ "type": "object",
+ "properties": [
+ { "name": "regionOverset", "type": "string", "enum": ["overset", "fit", "empty"], "description": "The \"overset\" attribute of a Named Flow." },
+ { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The corresponding DOM node id." }
+ ],
+ "description": "This object represents a region that flows from a Named Flow.",
+ "hidden": true
+ },
+ {
+ "id": "NamedFlow",
+ "type": "object",
+ "properties": [
+ { "name": "documentNodeId", "$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." },
+ { "name": "content", "type": "array", "items": { "$ref": "DOM.NodeId" }, "description": "An array of nodes that flow into the Named Flow." },
+ { "name": "regions", "type": "array", "items": { "$ref": "Region" }, "description": "An array of regions associated with the Named Flow." }
+ ],
+ "description": "This object represents a Named Flow.",
+ "hidden": true
}
],
"commands": [
@@ -1891,7 +2242,6 @@
"name": "getMatchedStylesForNode",
"parameters": [
{ "name": "nodeId", "$ref": "DOM.NodeId" },
- { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "optional": true, "description": "Element pseudo classes to force when computing applicable style rules." },
{ "name": "includePseudo", "type": "boolean", "optional": true, "description": "Whether to include pseudo styles (default: true)." },
{ "name": "includeInherited", "type": "boolean", "optional": true, "description": "Whether to include inherited styles (default: true)." }
],
@@ -1916,8 +2266,7 @@
{
"name": "getComputedStyleForNode",
"parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" },
- { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "optional": true, "description": "Element pseudo classes to force when computing applicable style rules." }
+ { "name": "nodeId", "$ref": "DOM.NodeId" }
],
"returns": [
{ "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." }
@@ -2009,10 +2358,18 @@
{
"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."
},
+ {
+ "name": "forcePseudoState",
+ "parameters": [
+ { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
+ { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
+ ],
+ "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
+ },
{
"name": "startSelectorProfiler"
},
@@ -2021,6 +2378,29 @@
"returns": [
{ "name": "profile", "$ref": "SelectorProfile" }
]
+ },
+ {
+ "name": "getNamedFlowCollection",
+ "parameters": [
+ { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id for which to get the Named Flow Collection." }
+ ],
+ "returns": [
+ { "name": "namedFlows", "type": "array", "items": { "$ref": "NamedFlow" }, "description": "An array containing the Named Flows in the document." }
+ ],
+ "description": "Returns the Named Flows from the document.",
+ "hidden": true
+ },
+ {
+ "name": "getFlowByName",
+ "parameters": [
+ { "name": "documentNodeId", "$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": [
@@ -2034,6 +2414,24 @@
{ "name": "styleSheetId", "$ref": "StyleSheetId" }
],
"description": "Fired whenever a stylesheet is changed as a result of the client operation."
+ },
+ {
+ "name": "namedFlowCreated",
+ "parameters": [
+ { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
+ { "name": "namedFlow", "type": "string", "description": "Identifier of the new Named Flow." }
+ ],
+ "description": "Fires when a Named Flow is created.",
+ "hidden": true
+ },
+ {
+ "name": "namedFlowRemoved",
+ "parameters": [
+ { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
+ { "name": "namedFlow", "type": "string", "description": "Identifier of the removed Named Flow." }
+ ],
+ "description": "Fires when a Named Flow is removed: has no associated content nodes and regions.",
+ "hidden": true
}
]
},
@@ -2071,6 +2469,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 +2526,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 +2563,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 +2596,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 +2679,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 +2726,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 +2734,42 @@
{ "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": "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." }
+ ],
+ "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."
+ },
+ {
+ "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": [
@@ -2448,14 +2904,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 +2995,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": [
@@ -2576,10 +3056,10 @@
"types": [],
"commands": [
{
- "name": "setWorkerInspectionEnabled",
- "parameters": [
- { "name": "value", "type": "boolean" }
- ]
+ "name": "enable"
+ },
+ {
+ "name": "disable"
},
{
"name": "sendMessageToWorker",
@@ -2633,5 +3113,21 @@
"name": "disconnectedFromWorker"
}
]
+ },
+ {
+ "domain": "WebGL",
+ "hidden": true,
+ "types": [],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables WebGL inspection."
+ },
+ {
+ "name": "disable",
+ "description": "Disables WebGL inspection."
+ }
+ ],
+ "events": []
}]
}
diff --git a/src/LiveDevelopment/Inspector/inspector.html b/src/LiveDevelopment/Inspector/inspector.html
index e76989d0ba0..b757a99d790 100644
--- a/src/LiveDevelopment/Inspector/inspector.html
+++ b/src/LiveDevelopment/Inspector/inspector.html
@@ -1,5 +1,4 @@
-
Detailed application cache resource information.
Detailed application cache information.
Frame identifier - manifest URL pair.
Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
@@ -615,8 +681,8 @@Code Example:
});
Enables application cache domain notifications.
@@ -624,17 +690,17 @@Code Example:
ApplicationCache.enable();
Returns manifest URL for document in the given frame.
@@ -644,17 +710,17 @@Code Example:
});
Returns relevant application cache data for the document in given frame.
@@ -664,15 +730,15 @@Code Example:
});
@@ -682,8 +748,8 @@Code Example:
}
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.
This object identifies a CSS style in a unique way.
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.
+This object identifies a CSS rule in a unique way.
CSS rule collection for a single pseudo style.
enum PseudoId
in RenderStyleConstants.h
).enum PseudoId
in RenderStyleConstants.h
).CSS rule collection for a single pseudo style.
CSS style information for a DOM style attribute.
CSS stylesheet metainformation.
CSS stylesheet contents.
CSS rule representation.
addRule()
), "regular" for regular stylesheets.Text range within a resource.
CSS style representation.
CSS style effective visual dimensions and source offsets.
false
if absent).false
if absent).true
if absent).true
if absent).CSS media query descriptor.
CSS selector profile entry.
This object represents a region that flows from a Named Flow.
+This object represents a Named Flow.
+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.
@@ -964,8 +1083,8 @@Code Example:
CSS.enable();
Disables the CSS agent for the given page.
@@ -973,49 +1092,47 @@Code Example:
CSS.disable();
Returns requested styles for a DOM node identified by nodeId
.
// WebInspector Command: CSS.getMatchedStylesForNode -CSS.getMatchedStylesForNode(nodeId, forcedPseudoClasses, includePseudo, includeInherited, function callback(res) { +CSS.getMatchedStylesForNode(nodeId, includePseudo, includeInherited, function callback(res) { // res = {matchedCSSRules, pseudoElements, inherited} });
Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId
.
@@ -1025,35 +1142,33 @@Code Example:
});
Returns the computed style for a DOM node identified by nodeId
.
// WebInspector Command: CSS.getComputedStyleForNode -CSS.getComputedStyleForNode(nodeId, forcedPseudoClasses, function callback(res) { +CSS.getComputedStyleForNode(nodeId, function callback(res) { // res = {computedStyle} });
Returns metainfo entries for all known stylesheets.
@@ -1063,17 +1178,17 @@Code Example:
});
Returns stylesheet data for the specified styleSheetId
.
styleSheetId
.styleSheetId
.@@ -1083,17 +1198,17 @@Code Example:
});
Returns the current textual content and the URL for a stylesheet.
@@ -1103,12 +1218,12 @@Code Example:
});
Sets the new stylesheet text, thereby invalidating all existing CSSStyleId
's and CSSRuleId
's contained by this stylesheet.
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
.
@@ -1144,12 +1259,12 @@Code Example:
});
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.
@@ -1168,19 +1283,19 @@Code Example:
});
Modifies the rule selector.
@@ -1190,19 +1305,19 @@Code Example:
});
Creates a new empty rule with the given selector
in a special "inspector" stylesheet in the owner document of the context node.
@@ -1212,13 +1327,13 @@Code Example:
});
Returns all supported CSS property names.
@@ -1228,20 +1343,35 @@Code Example:
});
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
++// WebInspector Command: CSS.forcePseudoState +CSS.forcePseudoState(nodeId, forcedPseudoClasses); ++
// WebInspector Command: CSS.startSelectorProfiler CSS.startSelectorProfiler();
@@ -1251,8 +1381,50 @@Code Example:
});
Returns the Named Flows from the document.
++// WebInspector Command: CSS.getNamedFlowCollection +CSS.getNamedFlowCollection(documentNodeId, function callback(res) { + // res = {namedFlows} +}); ++
Returns the Named Flow identified by the given name
++// WebInspector Command: CSS.getFlowByName +CSS.getFlowByName(documentNodeId, name, function callback(res) { + // res = {namedFlow} +}); ++
Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
@@ -1262,12 +1434,12 @@Code Example:
}
Fired whenever a stylesheet is changed as a result of the client operation.
@@ -1277,80 +1449,114 @@Code Example:
}
Fires when a Named Flow is created.
++// WebInspector Event: CSS.namedFlowCreated +function onNamedFlowCreated(res) { + // res = {documentNodeId, namedFlow} +} ++
Fires when a Named Flow is removed: has no associated content nodes and regions.
++// WebInspector Event: CSS.namedFlowRemoved +function onNamedFlowRemoved(res) { + // res = {documentNodeId, namedFlow} +} ++
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.
Console message.
Stack entry for console errors and assertions.
Call frames for assertions or error messages.
Enables console domain, sends the messages collected so far to the client by means of the messageAdded
notification.
@@ -1358,8 +1564,8 @@Code Example:
Console.enable();
Disables console domain, prevents further console messages from being reported to the client.
@@ -1367,8 +1573,8 @@Code Example:
Console.disable();
Clears console messages collected in the browser.
@@ -1376,12 +1582,12 @@Code Example:
Console.clearMessages();
Toggles monitoring of XMLHttpRequest. If true
, console will receive messages upon each XHR issued.
@@ -1389,12 +1595,12 @@Code Example:
Console.setMonitoringXHREnabled(enabled);
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
@@ -1402,8 +1608,8 @@Code Example:
Console.addInspectedNode(nodeId);
Issued when new console message is added.
@@ -1429,12 +1635,12 @@Code Example:
}
Issued when subsequent message(s) are equal to the previous one(s).
@@ -1444,8 +1650,8 @@Code Example:
}
Issued when console is cleared. This happens either upon clearMessages
command or after page navigation.
@@ -1456,166 +1662,165 @@Code Example:
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.
Unique DOM node identifier.
DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
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.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.Node
's nodeType.Node
's nodeType.Node
's nodeName.Node
's nodeName.Node
's localName.Node
's localName.Node
's nodeValue.Node
's nodeValue.Container
nodes.Container
nodes.Element
node in the form of flat array [name1, value1, name2, value2]
.Element
node in the form of flat array [name1, value1, name2, value2]
.Document
or FrameOwner
node points to.Document
or FrameOwner
node points to.DocumentType
's publicId.DocumentType
's publicId.DocumentType
's systemId.DocumentType
's systemId.DocumentType
's internalSubset.DocumentType
's internalSubset.Document
's XML version in case of XML documents.Document
's XML version in case of XML documents.Attr
's name.Attr
's name.Attr
's value.Attr
's value.DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
EventListener
's type.EventListener
's type.EventListener
's useCapture.EventListener
's useCapture.EventListener
's isAttribute.EventListener
's isAttribute.DOMNode
id.DOMNode
id.A structure holding an RGBA color.
Configuration data for the highlighting of page elements.
Returns the root DOM node to the caller.
@@ -1625,12 +1830,12 @@Code Example:
});
Requests that children of the node with given id are returned to the caller in form of setChildNodes
events.
@@ -1638,19 +1843,19 @@Code Example:
DOM.requestChildNodes(nodeId);
Executes querySelector
on a given node.
@@ -1660,19 +1865,19 @@Code Example:
});
Executes querySelectorAll
on a given node.
@@ -1682,19 +1887,19 @@Code Example:
});
Sets node name for a node with given id.
@@ -1704,14 +1909,14 @@Code Example:
});
Sets node value for a node with given id.
@@ -1719,12 +1924,12 @@Code Example:
DOM.setNodeValue(nodeId, value);
Removes node with given id.
@@ -1732,16 +1937,16 @@Code Example:
DOM.removeNode(nodeId);
Sets attribute for an element with given id.
@@ -1749,16 +1954,16 @@Code Example:
DOM.setAttributeValue(nodeId, name, value);
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.
@@ -1766,14 +1971,14 @@Code Example:
DOM.setAttributesAsText(nodeId, text, name);
Removes attribute with given name from an element with given id.
@@ -1781,17 +1986,17 @@Code Example:
DOM.removeAttribute(nodeId, name);
Returns event listeners relevant to the node.
@@ -1801,17 +2006,17 @@Code Example:
});
Returns node's HTML markup.
@@ -1821,14 +2026,14 @@Code Example:
});
Sets node HTML markup, returns new node id.
@@ -1836,19 +2041,19 @@Code Example:
DOM.setOuterHTML(nodeId, outerHTML);
Searches for a given string in the DOM tree. Use getSearchResults
to access search results or cancelSearch
to end this search session.
@@ -1858,21 +2063,21 @@Code Example:
});
Returns search results from given fromIndex
to given toIndex
from the sarch with the given identifier.
@@ -1882,12 +2087,12 @@Code Example:
});
Discards search results from the session with the given id. getSearchResults
should no longer be called for that search.
@@ -1895,17 +2100,17 @@Code Example:
DOM.discardSearchResults(searchId);
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.
@@ -1915,14 +2120,14 @@Code Example:
});
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspect' command upon element selection.
enabled == false
.enabled == false
.@@ -1930,22 +2135,22 @@Code Example:
DOM.setInspectModeEnabled(enabled, highlightConfig);
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
@@ -1953,14 +2158,14 @@Code Example:
DOM.highlightRect(x, y, width, height, color, outlineColor);
Highlights DOM node with given id.
@@ -1968,8 +2173,8 @@Code Example:
DOM.highlightNode(nodeId, highlightConfig);
Hides DOM node highlight.
@@ -1977,16 +2182,16 @@Code Example:
DOM.hideHighlight();
Highlights owner element of the frame with given id.
@@ -1994,17 +2199,17 @@Code Example:
DOM.highlightFrame(frameId, contentColor, contentOutlineColor);
Requests that the node is sent to the caller given its path. // FIXME, use XPath
@@ -2014,19 +2219,19 @@Code Example:
});
Resolves JavaScript node object for given node id.
@@ -2036,17 +2241,17 @@Code Example:
});
Returns attributes for the specified node.
@@ -2056,21 +2261,21 @@Code Example:
});
Moves node into the new container, places it before the given anchor.
@@ -2080,21 +2285,8 @@Code Example:
});
Toggles mouse event-based touch event emulation.
--// WebInspector Command: DOM.setTouchEmulationEnabled -DOM.setTouchEmulationEnabled(enabled); --
Undoes the last performed action.
@@ -2102,8 +2294,8 @@Code Example:
DOM.undo();
Re-does the last undone action.
@@ -2111,8 +2303,8 @@Code Example:
DOM.redo();
Marks last undoable state.
@@ -2120,8 +2312,8 @@Code Example:
DOM.markUndoableState();
Fired when Document
has been totally updated. Node ids are no longer valid.
@@ -2131,14 +2323,14 @@Code Example:
}
Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
@@ -2148,16 +2340,16 @@Code Example:
}
Fired when Element
's attribute is modified.
@@ -2167,14 +2359,14 @@Code Example:
}
Fired when Element
's attribute is removed.
@@ -2184,12 +2376,12 @@Code Example:
}
Fired when Element
's inline style is modified via a CSS property modification.
@@ -2199,14 +2391,14 @@Code Example:
}
Mirrors DOMCharacterDataModified
event.
@@ -2216,14 +2408,14 @@Code Example:
}
Fired when Container
's child node count has changed.
@@ -2233,16 +2425,16 @@Code Example:
}
Mirrors DOMNodeInserted
event.
@@ -2252,14 +2444,14 @@Code Example:
}
Mirrors DOMNodeRemoved
event.
@@ -2269,14 +2461,14 @@Code Example:
}
Called when shadow root is pushed into the element.
@@ -2286,14 +2478,14 @@Code Example:
}
Called when shadow root is popped from the element.
@@ -2304,39 +2496,39 @@Code Example:
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 +TypeDOM breakpoint type.
Sets breakpoint on particular operation with DOM.
@@ -2344,14 +2536,14 @@Code Example:
DOMDebugger.setDOMBreakpoint(nodeId, type);
Removes DOM breakpoint that was set using setDOMBreakpoint
.
@@ -2359,12 +2551,12 @@Code Example:
DOMDebugger.removeDOMBreakpoint(nodeId, type);
Sets breakpoint on particular DOM event.
@@ -2372,12 +2564,12 @@Code Example:
DOMDebugger.setEventListenerBreakpoint(eventName);
Removes breakpoint on particular DOM event.
@@ -2385,12 +2577,12 @@Code Example:
DOMDebugger.removeEventListenerBreakpoint(eventName);
Sets breakpoint on particular native event.
@@ -2398,12 +2590,12 @@Code Example:
DOMDebugger.setInstrumentationBreakpoint(eventName);
Sets breakpoint on particular native event.
@@ -2411,12 +2603,12 @@Code Example:
DOMDebugger.removeInstrumentationBreakpoint(eventName);
Sets breakpoint on XMLHttpRequest.
@@ -2424,12 +2616,12 @@Code Example:
DOMDebugger.setXHRBreakpoint(url);
Removes breakpoint from XMLHttpRequest.
@@ -2438,40 +2630,56 @@Code Example:
Unique identifier of DOM storage entry.
+DOM Storage entry.
DOM Storage item.
+Enables storage tracking, storage events will now be delivered to the client.
@@ -2479,8 +2687,8 @@Code Example:
DOMStorage.enable();
Disables storage tracking, prevents storage events from being sent to the client.
@@ -2488,16 +2696,16 @@Code Example:
DOMStorage.disable();
@@ -2507,11 +2715,11 @@Code Example:
});
@@ -2565,62 +2773,70 @@Code Example:
}
-// WebInspector Event: DOMStorage.updateDOMStorage -function onUpdateDOMStorage(res) { +// WebInspector Event: DOMStorage.domStorageUpdated +function onDomStorageUpdated(res) { // res = {storageId} }
Unique identifier of Database object.
+Database object.
Database error.
Enables database tracking, database events will now be delivered to the client.
@@ -2628,8 +2844,8 @@Code Example:
Database.enable();
Disables database tracking, prevents database events from being sent to the client.
@@ -2637,11 +2853,11 @@Code Example:
Database.disable();
@@ -2693,8 +2909,8 @@Code Example:
}
@@ -2728,132 +2944,138 @@Code Example:
Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
-Type +TypeBreakpoint identifier.
Unique script identifier.
Call frame identifier.
Location in the source code.
Debugger.scriptParsed
.Debugger.scriptParsed
.Information about the function.
JavaScript call frame. Array of call frames form the call stack.
this
object for this call frame.this
object for this call frame.Scope description.
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.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.Tells whether enabling debugger causes scripts recompilation.
@@ -2863,24 +3085,24 @@Code Example:
});
Tells whether debugger supports native breakpoints.
+Tells whether debugger supports separate script compilation and execution.
-// WebInspector Command: Debugger.supportsNativeBreakpoints -Debugger.supportsNativeBreakpoints(function callback(res) { +// WebInspector Command: Debugger.supportsSeparateScriptCompilationAndExecution +Debugger.supportsSeparateScriptCompilationAndExecution(function callback(res) { // res = {result} });
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
@@ -2888,8 +3110,8 @@Code Example:
Debugger.enable();
Disables debugger for given page.
@@ -2897,12 +3119,12 @@Code Example:
Debugger.disable();
Activates / deactivates all breakpoints on the page.
@@ -2910,27 +3132,27 @@Code Example:
Debugger.setBreakpointsActive(active);
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.
url
or urlRegex
must be specified.url
or urlRegex
must be specified.@@ -2940,21 +3162,21 @@Code Example:
});
Sets JavaScript breakpoint at a given location.
@@ -2964,12 +3186,12 @@Code Example:
});
Removes JavaScript breakpoint.
@@ -2977,12 +3199,12 @@Code Example:
Debugger.removeBreakpoint(breakpointId);
Continues execution until specific location is reached.
@@ -2990,8 +3212,8 @@Code Example:
Debugger.continueToLocation(location);
Steps over the statement.
@@ -2999,8 +3221,8 @@Code Example:
Debugger.stepOver();
Steps into the function call.
@@ -3008,8 +3230,8 @@Code Example:
Debugger.stepInto();
Steps out of the function call.
@@ -3017,8 +3239,8 @@Code Example:
Debugger.stepOut();
Stops on the next JavaScript statement.
@@ -3026,8 +3248,8 @@Code Example:
Debugger.pause();
Resumes JavaScript execution.
@@ -3035,23 +3257,23 @@Code Example:
Debugger.resume();
Searches for given string in script content.
@@ -3061,13 +3283,13 @@Code Example:
});
Tells whether setScriptSource
is supported.
setScriptSource
is supported.setScriptSource
is supported.@@ -3077,23 +3299,23 @@Code Example:
});
Edits JavaScript source live.
@@ -3103,17 +3325,39 @@Code Example:
});
Restarts particular call frame from the beginning.
++// WebInspector Command: Debugger.restartFrame +Debugger.restartFrame(callFrameId, function callback(res) { + // res = {callFrames, result} +}); ++
Returns source for the script with given id.
@@ -3123,17 +3367,17 @@Code Example:
});
Returns detailed informtation on given function.
@@ -3143,12 +3387,12 @@Code Example:
});
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
.
@@ -3156,38 +3400,105 @@Code Example:
Debugger.setPauseOnExceptions(state);
Evaluates expression on a given call frame.
releaseObjectGroup
).releaseObjectGroup
).// WebInspector Command: Debugger.evaluateOnCallFrame -Debugger.evaluateOnCallFrame(callFrameId, expression, objectGroup, includeCommandLineAPI, returnByValue, function callback(res) { +Debugger.evaluateOnCallFrame(callFrameId, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, function callback(res) { + // res = {result, wasThrown} +}); ++
Compiles expression.
++// WebInspector Command: Debugger.compileScript +Debugger.compileScript(expression, sourceURL, function callback(res) { + // res = {scriptId, syntaxErrorMessage} +}); ++
Runs script with given id in a given context.
++// WebInspector Command: Debugger.runScript +Debugger.runScript(scriptId, contextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, function callback(res) { // res = {result, wasThrown} });
Sets overlay message.
++// WebInspector Command: Debugger.setOverlayMessage +Debugger.setOverlayMessage(message); ++
Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.
@@ -3197,26 +3508,26 @@Code Example:
}
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
@@ -3226,20 +3537,20 @@Code Example:
}
Fired when virtual machine fails to parse the script.
@@ -3249,14 +3560,14 @@Code Example:
}
Fired when breakpoint is resolved to an actual script and location.
@@ -3266,16 +3577,16 @@Code Example:
}
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
@@ -3285,8 +3596,8 @@Code Example:
}
Fired when the virtual machine resumed execution.
@@ -3297,16 +3608,68 @@Code Example:
Request Identifier to glue a request and its completion event.
+Represents a browser side file or directory.
+Represents metadata of a file or entry.
+Enables events from backend.
@@ -3314,136 +3677,319 @@Code Example:
FileSystem.enable();
Disables events from backend..
+Disables events from backend.
// WebInspector Command: FileSystem.disable FileSystem.disable();
Returns root directory of the FileSystem as fileSystemRootReceived event, if exists.
++// WebInspector Command: FileSystem.requestFileSystemRoot +FileSystem.requestFileSystemRoot(origin, type, function callback(res) { + // res = {requestId} +}); ++
Returns content of the directory as directoryContentReceived event.
++// WebInspector Command: FileSystem.requestDirectoryContent +FileSystem.requestDirectoryContent(url, function callback(res) { + // res = {requestId} +}); ++
Returns metadata of the entry as metadataReceived event.
++// WebInspector Command: FileSystem.requestMetadata +FileSystem.requestMetadata(url, function callback(res) { + // res = {requestId} +}); ++
Returns content of the file as fileContentReceived event. Result should be sliced into [start, end).
++// WebInspector Command: FileSystem.requestFileContent +FileSystem.requestFileContent(url, readAsText, start, end, charset, function callback(res) { + // res = {requestId} +}); ++
Completion event of requestFileSystemRoot command.
++// WebInspector Event: FileSystem.fileSystemRootReceived +function onFileSystemRootReceived(res) { + // res = {requestId, errorCode, root} +} ++
Completion event of requestDirectoryContent command.
++// WebInspector Event: FileSystem.directoryContentReceived +function onDirectoryContentReceived(res) { + // res = {requestId, errorCode, entries} +} ++
Completion event of requestMetadata command.
++// WebInspector Event: FileSystem.metadataReceived +function onMetadataReceived(res) { + // res = {requestId, errorCode, metadata} +} ++
Completion event of requestFileContent command.
++// WebInspector Event: FileSystem.fileContentReceived +function onFileContentReceived(res) { + // res = {requestId, errorCode, content, charset} +} ++
Security origin with database names.
Database with an array of object stores.
Object store.
Object store index.
Key.
Key range.
Key.
+Data entry.
Key path.
+Enables events from backend.
@@ -3451,8 +3997,8 @@Code Example:
IndexedDB.enable();
Disables events from backend.
@@ -3460,14 +4006,14 @@Code Example:
IndexedDB.disable();
Requests database names for given frame's security origin.
@@ -3475,16 +4021,16 @@Code Example:
IndexedDB.requestDatabaseNamesForFrame(requestId, frameId);
Requests database with given name in given frame.
@@ -3492,26 +4038,26 @@Code Example:
IndexedDB.requestDatabase(requestId, frameId, databaseName);
Requests data from object store or index.
@@ -3519,13 +4065,13 @@Code Example:
IndexedDB.requestData(requestId, frameId, databaseName, objectStoreName, indexName, skipCount, pageSize, keyRange);
@@ -3535,13 +4081,13 @@Code Example:
}
@@ -3551,15 +4097,15 @@Code Example:
}
@@ -3569,15 +4115,15 @@Code Example:
}
@@ -3588,23 +4134,21 @@Code Example:
Enables inspector domain notifications.
@@ -3612,8 +4156,8 @@Code Example:
Inspector.enable();
Disables inspector domain notifications.
@@ -3621,8 +4165,8 @@Code Example:
Inspector.disable();
-// WebInspector Event: Inspector.didCreateWorker -function onDidCreateWorker(res) { - // res = {id, url, isShared} -} --
-// WebInspector Event: Inspector.didDestroyWorker -function onDidDestroyWorker(res) { - // res = {id} -} --
Number of nodes with given name.
Number of JS event listeners by event type.
Character data statistics for the page.
@@ -3764,212 +4289,243 @@Code Example:
});
+// WebInspector Command: Memory.getProcessMemoryDistribution +Memory.getProcessMemoryDistribution(function callback(res) { + // res = {distribution} +}); ++
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 +TypeUnique loader identifier.
Unique frame identifier.
Unique request identifier.
Number of seconds since epoch.
Request / response headers as keys / values of JSON object.
Timing information for the request.
HTTP request data.
HTTP response data.
WebSocket request data.
WebSocket response data.
WebSocket frame data.
+Information about the cached resource.
Information about the request initiator.
Enables network tracking, network events will now be delivered to the client.
@@ -3977,8 +4533,8 @@Code Example:
Network.enable();
Disables network tracking, prevents network events from being sent to the client.
@@ -3986,12 +4542,12 @@Code Example:
Network.disable();
Allows overriding user agent with the given string.
@@ -3999,12 +4555,12 @@Code Example:
Network.setUserAgentOverride(userAgent);
Specifies whether to always send extra HTTP headers with the requests from this page.
@@ -4012,19 +4568,19 @@Code Example:
Network.setExtraHTTPHeaders(headers);
Returns content served for the given request.
@@ -4034,13 +4590,13 @@Code Example:
});
Tells whether clearing browser cache is supported.
@@ -4050,8 +4606,8 @@Code Example:
});
Clears browser cache.
@@ -4059,13 +4615,13 @@Code Example:
Network.clearBrowserCache();
Tells whether clearing browser cookies is supported.
@@ -4075,8 +4631,8 @@Code Example:
});
Clears browser cookies.
@@ -4084,12 +4640,12 @@Code Example:
Network.clearBrowserCookies();
Toggles ignoring cache for each request. If true
, cache will not be used.
@@ -4097,43 +4653,41 @@Code Example:
Network.setCacheDisabled(cacheDisabled);
Fired when page is about to send HTTP request.
// 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} }
Fired if request ended up loading from cache.
@@ -4143,22 +4697,22 @@Code Example:
}
Fired when HTTP response is available.
@@ -4168,18 +4722,18 @@Code Example:
}
Fired when data chunk was received over the network.
@@ -4189,14 +4743,14 @@Code Example:
}
Fired when HTTP request has finished loading.
@@ -4206,18 +4760,18 @@Code Example:
}
Fired when HTTP request has failed to load.
@@ -4227,24 +4781,24 @@Code Example:
}
Fired when HTTP request has been served from memory cache.
@@ -4254,16 +4808,16 @@Code Example:
}
Fired when WebSocket is about to initiate handshake.
@@ -4273,16 +4827,16 @@Code Example:
}
Fired when WebSocket handshake response becomes available.
@@ -4292,14 +4846,14 @@Code Example:
}
Fired upon WebSocket creation.
@@ -4309,14 +4863,14 @@Code Example:
}
Fired when WebSocket is closed.
@@ -4326,139 +4880,206 @@Code Example:
}
Fired when WebSocket frame is received.
++// WebInspector Event: Network.webSocketFrameReceived +function onWebSocketFrameReceived(res) { + // res = {requestId, timestamp, response} +} ++
Fired when WebSocket frame error occurs.
++// WebInspector Event: Network.webSocketFrameError +function onWebSocketFrameError(res) { + // res = {requestId, timestamp, errorMessage} +} ++
Fired when WebSocket frame is sent.
++// WebInspector Event: Network.webSocketFrameSent +function onWebSocketFrameSent(res) { + // res = {requestId, timestamp, response} +} ++
Actions and events related to the inspected page belong to the page domain.
-Type +Type