diff --git a/src/LiveDevelopment/Agents/DOMAgent.js b/src/LiveDevelopment/Agents/DOMAgent.js
index da7950e0792..f34e030f48a 100644
--- a/src/LiveDevelopment/Agents/DOMAgent.js
+++ b/src/LiveDevelopment/Agents/DOMAgent.js
@@ -209,7 +209,9 @@ define(function DOMAgent(require, exports, module) {
// WebInspector Event: Page.frameNavigated
function _onFrameNavigated(event, res) {
// res = {frame}
- exports.url = _cleanURL(res.frame.url);
+ if (!res.frame.parentId) {
+ exports.url = _cleanURL(res.frame.url);
+ }
}
// WebInspector Event: DOM.documentUpdated
@@ -291,6 +293,9 @@ define(function DOMAgent(require, exports, module) {
if (n.location > node.location) {
n.location += delta;
}
+ if (n.closeLocation !== undefined && n.closeLocation > node.location) {
+ n.closeLocation += delta;
+ }
});
}
}
diff --git a/src/LiveDevelopment/Agents/RemoteFunctions.js b/src/LiveDevelopment/Agents/RemoteFunctions.js
index d3831e5b22d..f06a1b1c581 100644
--- a/src/LiveDevelopment/Agents/RemoteFunctions.js
+++ b/src/LiveDevelopment/Agents/RemoteFunctions.js
@@ -38,6 +38,17 @@ function RemoteFunctions(experimental) {
var HIGHLIGHT_CLASSNAME = "__brackets-ld-highlight",
KEEP_ALIVE_TIMEOUT = 3000; // Keep alive timeout value, in milliseconds
+ // determine whether an event should be processed for Live Development
+ function _validEvent(event) {
+ if (navigator.platform.substr(0, 3) === "Mac") {
+ // Mac
+ return event.metaKey;
+ } else {
+ // Windows
+ return event.ctrlKey;
+ }
+ }
+
// determine the color for a type
function _typeColor(type, highlight) {
switch (type) {
@@ -297,6 +308,12 @@ function RemoteFunctions(experimental) {
for (i = 0; i < highlights.length; i++) {
body.removeChild(highlights[i]);
}
+
+ if (this.trigger) {
+ for (i = 0; i < this.elements.length; i++) {
+ _trigger(this.elements[i], "highlight", 0);
+ }
+ }
this.elements = [];
},
@@ -340,17 +357,15 @@ function RemoteFunctions(experimental) {
/** Event Handlers ***********************************************************/
function onMouseOver(event) {
- if (!event.metaKey) {
- return;
+ if (_validEvent(event)) {
+ _localHighlight.add(event.target, true);
}
- _localHighlight.add(event.target, true);
}
function onMouseOut(event) {
- if (!event.metaKey) {
- return;
+ if (_validEvent(event)) {
+ _localHighlight.clear();
}
- _localHighlight.clear();
}
function onMouseMove(event) {
@@ -359,20 +374,19 @@ function RemoteFunctions(experimental) {
}
function onClick(event) {
- if (!event.metaKey) {
- return;
- }
- event.preventDefault();
- event.stopPropagation();
- if (event.altKey) {
- _toggleEditor(event.target);
- } else {
- _toggleMenu(event.target);
+ if (_validEvent(event)) {
+ event.preventDefault();
+ event.stopPropagation();
+ if (event.altKey) {
+ _toggleEditor(event.target);
+ } else {
+ _toggleMenu(event.target);
+ }
}
}
function onKeyUp(event) {
- if (_setup && !event.metaKey) {
+ if (_setup && !_validEvent(event)) {
document.removeEventListener("keyup", onKeyUp);
document.removeEventListener("mouseover", onMouseOver);
document.removeEventListener("mouseout", onMouseOut);
@@ -385,7 +399,7 @@ function RemoteFunctions(experimental) {
}
function onKeyDown(event) {
- if (!_setup && event.metaKey) {
+ if (!_setup && _validEvent(event)) {
document.addEventListener("keyup", onKeyUp);
document.addEventListener("mouseover", onMouseOver);
document.addEventListener("mouseout", onMouseOut);
diff --git a/src/LiveDevelopment/Inspector/Inspector.json b/src/LiveDevelopment/Inspector/Inspector.json
index 51566ad332f..8dfdc55c001 100644
--- a/src/LiveDevelopment/Inspector/Inspector.json
+++ b/src/LiveDevelopment/Inspector/Inspector.json
@@ -89,6 +89,16 @@
{ "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" }}
]
+ },
+ {
+ "id": "HeapSnapshotChunk",
+ "type": "object",
+ "properties": [
+ { "name": "strings", "type": "array", "items": { "type": "string" }, "description": "An array of strings that were found since last update." },
+ { "name": "nodes", "type": "array", "items": { "type": "integer" }, "description": "An array of nodes that were found since last update." },
+ { "name": "edges", "type": "array", "items": { "type": "integer" }, "description": "An array of edges that were found since last update." },
+ { "name": "baseToRealNodeId", "type": "array", "items": { "type": "integer" }, "description": "An array of integers for nodeId remapping. Even nodeId has to be mapped to the following odd nodeId." }
+ ]
}
],
"commands": [
@@ -99,12 +109,31 @@
{ "name": "strings", "$ref": "StringStatistics" }
]
},
+ {
+ "name": "getDOMCounters",
+ "returns": [
+ { "name": "documents", "type": "integer" },
+ { "name": "nodes", "type": "integer" },
+ { "name": "jsEventListeners", "type": "integer" }
+ ]
+ },
{
"name": "getProcessMemoryDistribution",
+ "parameters": [
+ { "name": "reportGraph", "type": "boolean", "optional": true, "description": "Whether native memory graph should be reported in addition to aggregated statistics." }
+ ],
"returns": [
{ "name": "distribution", "$ref": "MemoryBlock", "description": "An object describing all memory allocated by the process"}
]
}
+ ],
+ "events": [
+ {
+ "name": "addNativeSnapshotChunk",
+ "parameters": [
+ { "name": "chunk", "$ref": "HeapSnapshotChunk", "description": "A chunk of the serialized the snapshot." }
+ ]
+ }
]
},
{
@@ -230,7 +259,8 @@
"name": "reload",
"parameters": [
{ "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." },
- { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }
+ { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." },
+ { "name": "scriptPreprocessor", "type": "string", "optional": true, "description": "Script body that should evaluate to function that will preprocess all the scripts before their compilation.", "hidden": true }
],
"description": "Reloads given page optionally ignoring the cache."
},
@@ -254,9 +284,9 @@
"name": "deleteCookie",
"parameters": [
{ "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
- { "name": "domain", "type": "string", "description": "Domain of the cookie to remove." }
+ { "name": "url", "type": "string", "description": "URL to match cooke domain and path." }
],
- "description": "Deletes browser cookie with given name for the given domain.",
+ "description": "Deletes browser cookie with given name, domain and path.",
"hidden": true
},
{
@@ -344,6 +374,54 @@
],
"hidden": true
},
+ {
+ "name": "canShowDebugBorders",
+ "description": "Tells if backend supports debug borders on layers",
+ "returns": [
+ { "name": "show", "type": "boolean", "description": "True if the debug borders can be shown" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "setShowDebugBorders",
+ "description": "Requests that backend shows debug borders on layers",
+ "parameters": [
+ { "name": "show", "type": "boolean", "description": "True for showing debug borders" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "canShowFPSCounter",
+ "description": "Tells if backend supports a FPS counter display",
+ "returns": [
+ { "name": "show", "type": "boolean", "description": "True if the FPS count can be shown" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "setShowFPSCounter",
+ "description": "Requests that backend shows the FPS counter",
+ "parameters": [
+ { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "canContinuouslyPaint",
+ "description": "Tells if backend supports continuous painting",
+ "returns": [
+ { "name": "value", "type": "boolean", "description": "True if continuous painting is available" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "setContinuousPaintingEnabled",
+ "description": "Requests that backend enables continuous painting",
+ "parameters": [
+ { "name": "enabled", "type": "boolean", "description": "True for enabling cointinuous painting" }
+ ],
+ "hidden": true
+ },
{
"name": "getScriptExecutionStatus",
"description": "Determines if scripts can be executed in the page.",
@@ -412,6 +490,14 @@
"description": "Toggles mouse event-based touch event emulation.",
"hidden": true
},
+ {
+ "name": "setEmulatedMedia",
+ "parameters": [
+ { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
+ ],
+ "description": "Emulates the given media for CSS media queries.",
+ "hidden": true
+ },
{
"name": "getCompositingBordersVisible",
"description": "Indicates the visibility of compositing borders.",
@@ -427,6 +513,22 @@
{ "name": "visible", "type": "boolean", "description": "True for showing compositing borders." }
],
"hidden": true
+ },
+ {
+ "name": "captureScreenshot",
+ "description": "Capture page screenshot.",
+ "returns": [
+ { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "handleJavaScriptDialog",
+ "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
+ "parameters": [
+ { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }
+ ],
+ "hidden": true
}
],
"events": [
@@ -457,6 +559,52 @@
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has been detached." }
],
"hidden": true
+ },
+ {
+ "name": "frameStartedLoading",
+ "description": "Fired when frame has started loading.",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has started loading." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "frameStoppedLoading",
+ "description": "Fired when frame has stopped loading.",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has stopped loading." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "frameScheduledNavigation",
+ "description": "Fired when frame schedules a potential navigation.",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." },
+ { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "frameClearedScheduledNavigation",
+ "description": "Fired when frame no longer has a scheduled navigation.",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "javascriptDialogOpening",
+ "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.",
+ "parameters": [
+ { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "javascriptDialogClosed",
+ "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
+ "hidden": true
}
]
},
@@ -659,7 +807,7 @@
{ "name": "source", "type": "string", "enum": ["html", "wml", "xml", "javascript", "network", "console-api", "other"], "description": "Message source." },
{ "name": "level", "type": "string", "enum": ["tip", "log", "warning", "error", "debug"], "description": "Message severity." },
{ "name": "text", "type": "string", "description": "Message text." },
- { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "trace", "startGroup", "startGroupCollapsed", "endGroup", "assert"], "description": "Console message type." },
+ { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing"], "description": "Console message type." },
{ "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
{ "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
{ "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
@@ -689,22 +837,22 @@
"commands": [
{
"name": "enable",
- "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded
notification."
+ "description": "Enables console domain, sends the messages collected so far to the client by means of the messageAdded
notification."
},
{
"name": "disable",
- "description": "Disables console domain, prevents further console messages from being reported to the client."
+ "description": "Disables console domain, prevents further console messages from being reported to the client."
},
{
"name": "clearMessages",
- "description": "Clears console messages collected in the browser."
+ "description": "Clears console messages collected in the browser."
},
{
"name": "setMonitoringXHREnabled",
"parameters": [
{ "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
],
- "description": "Toggles monitoring of XMLHttpRequest. If true
, console will receive messages upon each XHR issued.",
+ "description": "Toggles monitoring of XMLHttpRequest. If true
, console will receive messages upon each XHR issued.",
"hidden": true
},
{
@@ -808,7 +956,7 @@
"type": "object",
"description": "HTTP response data.",
"properties": [
- { "name": "url", "type": "string", "description": "Response URL." },
+ { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
{ "name": "status", "type": "number", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
@@ -828,7 +976,6 @@
"description": "WebSocket request data.",
"hidden": true,
"properties": [
- { "name": "requestKey3", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
@@ -840,8 +987,7 @@
"properties": [
{ "name": "status", "type": "number", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
- { "name": "challengeResponse", "type": "string", "description": "Challenge response." }
+ { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
@@ -860,7 +1006,7 @@
"type": "object",
"description": "Information about the cached resource.",
"properties": [
- { "name": "url", "type": "string", "description": "Resource URL." },
+ { "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." },
{ "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
{ "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." },
{ "name": "bodySize", "type": "number", "description": "Cached response body size." }
@@ -947,7 +1093,7 @@
"parameters": [
{ "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." }
],
- "description": "Toggles ignoring cache for each request. If true
, cache will not be used."
+ "description": "Toggles ignoring cache for each request. If true
, cache will not be used."
}
],
"events": [
@@ -1242,8 +1388,8 @@
"type": "object",
"description": "Data entry.",
"properties": [
- { "name": "key", "$ref": "Key", "description": "Key." },
- { "name": "primaryKey", "$ref": "Key", "description": "Primary key." },
+ { "name": "key", "$ref": "Runtime.RemoteObject", "description": "Key." },
+ { "name": "primaryKey", "$ref": "Runtime.RemoteObject", "description": "Primary key." },
{ "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value." }
]
},
@@ -1387,10 +1533,34 @@
]
},
{
- "name": "domStorageUpdated",
+ "name": "domStorageItemsCleared",
"parameters": [
{ "name": "storageId", "$ref": "StorageId" }
]
+ },
+ {
+ "name": "domStorageItemRemoved",
+ "parameters": [
+ { "name": "storageId", "$ref": "StorageId" },
+ { "name": "key", "type": "string" }
+ ]
+ },
+ {
+ "name": "domStorageItemAdded",
+ "parameters": [
+ { "name": "storageId", "$ref": "StorageId" },
+ { "name": "key", "type": "string" },
+ { "name": "newValue", "type": "string" }
+ ]
+ },
+ {
+ "name": "domStorageItemUpdated",
+ "parameters": [
+ { "name": "storageId", "$ref": "StorageId" },
+ { "name": "key", "type": "string" },
+ { "name": "oldValue", "type": "string" },
+ { "name": "newValue", "type": "string" }
+ ]
}
]
},
@@ -1613,8 +1783,10 @@
{ "name": "xmlVersion", "type": "string", "optional": true, "description": "Document
's XML version in case of XML documents." },
{ "name": "name", "type": "string", "optional": true, "description": "Attr
's name." },
{ "name": "value", "type": "string", "optional": true, "description": "Attr
's value." },
+ { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Frame ID for frame owner elements." },
{ "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." },
- { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host." }
+ { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host." },
+ { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements" }
],
"description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
},
@@ -1668,9 +1840,10 @@
{
"name": "requestChildNodes",
"parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." }
+ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." },
+ { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0." }
],
- "description": "Requests that children of the node with given id are returned to the caller in form of setChildNodes
events."
+ "description": "Requests that children of the node with given id are returned to the caller in form of setChildNodes
events where not only immediate children are retrieved, but all children down to the specified depth."
},
{
"name": "querySelector",
@@ -1842,10 +2015,11 @@
{
"name": "highlightNode",
"parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Identifier of the node to highlight." },
- { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }
+ { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." },
+ { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." },
+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted." }
],
- "description": "Highlights DOM node with given id."
+ "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified."
},
{
"name": "hideHighlight",
@@ -1919,6 +2093,14 @@
"name": "markUndoableState",
"description": "Marks last undoable state.",
"hidden": true
+ },
+ {
+ "name": "focus",
+ "parameters": [
+ { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to focus." }
+ ],
+ "description": "Focuses the given element.",
+ "hidden": true
}
],
"events": [
@@ -2791,6 +2973,18 @@
],
"hidden": true,
"description": "Sets overlay message."
+ },
+ {
+ "name": "setVariableValue",
+ "parameters": [
+ { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
+ { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." },
+ { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
+ { "name": "variableName", "type": "string", "description": "Variable name." },
+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }
+ ],
+ "hidden": true,
+ "description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually."
}
],
"events": [
@@ -2937,12 +3131,29 @@
]
},
{
- "id": "Profile",
+ "id": "CPUProfileNode",
+ "type": "object",
+ "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
+ "properties": [
+ { "name": "functionName", "type": "string", "description": "Function name." },
+ { "name": "url", "type": "string", "description": "URL." },
+ { "name": "lineNumber", "type": "integer", "description": "Line number." },
+ { "name": "totalTime", "type": "number", "description": "Total execution time." },
+ { "name": "selfTime", "type": "number", "description": "Self time." },
+ { "name": "numberOfCalls", "type": "integer", "description": "Number of calls." },
+ { "name": "visible", "type": "boolean", "description": "Visibility." },
+ { "name": "callUID", "type": "number", "description": "Call UID." },
+ { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." }
+ ]
+ },
+ {
+ "id": "CPUProfile",
"type": "object",
"description": "Profile.",
"properties": [
- { "name": "head", "type": "object", "optional": true },
- { "name": "bottomUpHead", "type": "object", "optional": true }
+ { "name": "head", "$ref": "CPUProfileNode", "optional": true },
+ { "name": "bottomUpHead", "$ref": "CPUProfileNode", "optional": true },
+ { "name": "idleTime", "type": "number", "optional": true }
]
},
{
@@ -2989,13 +3200,18 @@
]
},
{
- "name": "getProfile",
+ "name": "getCPUProfile",
"parameters": [
- { "name": "type", "type": "string" },
{ "name": "uid", "type": "integer" }
],
"returns": [
- { "name": "profile", "$ref": "Profile" }
+ { "name": "profile", "$ref": "CPUProfile" }
+ ]
+ },
+ {
+ "name": "getHeapSnapshot",
+ "parameters": [
+ { "name": "uid", "type": "integer" }
]
},
{
@@ -3009,7 +3225,10 @@
"name": "clearProfiles"
},
{
- "name": "takeHeapSnapshot"
+ "name": "takeHeapSnapshot",
+ "parameters": [
+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
+ ]
},
{
"name": "collectGarbage"
@@ -3141,30 +3360,64 @@
"hidden": true,
"types": [
{
- "id": "TraceLogId",
+ "id": "ResourceId",
"type": "string",
- "description": "Unique object identifier."
+ "description": "Unique resource identifier."
+ },
+ {
+ "id": "ResourceInfo",
+ "type": "object",
+ "properties": [
+ { "name": "id", "$ref": "ResourceId" },
+ { "name": "description", "type": "string" }
+ ]
+ },
+ {
+ "id": "ResourceState",
+ "type": "object",
+ "properties": [
+ { "name": "id", "$ref": "ResourceId" },
+ { "name": "traceLogId", "$ref": "TraceLogId" },
+ { "name": "imageURL", "type": "string", "optional": true, "description": "Screenshot image data URL." }
+ ]
+ },
+ {
+ "id": "CallArgument",
+ "type": "object",
+ "properties": [
+ { "name": "description", "type": "string" }
+ ]
},
{
"id": "Call",
"type": "object",
"properties": [
+ { "name": "contextId", "$ref": "ResourceId" },
{ "name": "functionName", "type": "string", "optional": true },
- { "name": "arguments", "type": "array", "items": { "type": "string" }, "optional": true },
+ { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument" }, "optional": true },
+ { "name": "result", "$ref": "CallArgument", "optional": true },
+ { "name": "isDrawingCall", "type": "boolean", "optional": true },
{ "name": "property", "type": "string", "optional": true },
- { "name": "value", "type": "string", "optional": true },
- { "name": "result", "type": "string", "optional": true },
+ { "name": "value", "$ref": "CallArgument", "optional": true },
{ "name": "sourceURL", "type": "string", "optional": true },
{ "name": "lineNumber", "type": "integer", "optional": true },
{ "name": "columnNumber", "type": "integer", "optional": true }
]
},
+ {
+ "id": "TraceLogId",
+ "type": "string",
+ "description": "Unique trace log identifier."
+ },
{
"id": "TraceLog",
"type": "object",
"properties": [
{ "name": "id", "$ref": "TraceLogId" },
- { "name": "calls", "type": "array", "items": { "$ref": "Call" } }
+ { "name": "calls", "type": "array", "items": { "$ref": "Call" } },
+ { "name": "startOffset", "type": "integer" },
+ { "name": "alive", "type": "boolean" },
+ { "name": "totalAvailableCalls", "type": "number" }
]
}
],
@@ -3183,16 +3436,45 @@
{ "name": "traceLogId", "$ref": "TraceLogId" }
]
},
+ {
+ "name": "hasUninstrumentedCanvases",
+ "returns": [
+ { "name": "result", "type": "boolean" }
+ ],
+ "description": "Checks if there is any uninstrumented canvas in the inspected page."
+ },
{
"name": "captureFrame",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." }
+ ],
+ "returns": [
+ { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." }
+ ],
+ "description": "Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared."
+ },
+ {
+ "name": "startCapturing",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." }
+ ],
"returns": [
+ { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." }
+ ],
+ "description": "Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command."
+ },
+ {
+ "name": "stopCapturing",
+ "parameters": [
{ "name": "traceLogId", "$ref": "TraceLogId" }
]
},
{
"name": "getTraceLog",
"parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" }
+ { "name": "traceLogId", "$ref": "TraceLogId" },
+ { "name": "startOffset", "type": "integer", "optional": true },
+ { "name": "maxLength", "type": "integer", "optional": true }
],
"returns": [
{ "name": "traceLog", "$ref": "TraceLog" }
@@ -3205,10 +3487,152 @@
{ "name": "stepNo", "type": "integer" }
],
"returns": [
- { "name": "screenshotDataUrl", "type": "string" }
+ { "name": "resourceState", "$ref": "ResourceState" }
+ ]
+ },
+ {
+ "name": "getResourceInfo",
+ "parameters": [
+ { "name": "resourceId", "$ref": "ResourceId" }
+ ],
+ "returns": [
+ { "name": "resourceInfo", "$ref": "ResourceInfo" }
+ ]
+ },
+ {
+ "name": "getResourceState",
+ "parameters": [
+ { "name": "traceLogId", "$ref": "TraceLogId" },
+ { "name": "resourceId", "$ref": "ResourceId" }
+ ],
+ "returns": [
+ { "name": "resourceState", "$ref": "ResourceState" }
]
}
],
+ "events": [
+ {
+ "name": "contextCreated",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Identifier of the frame containing a canvas with a context." }
+ ],
+ "description": "Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command)."
+ },
+ {
+ "name": "traceLogsRemoved",
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "If given, trace logs from the given frame were removed." },
+ { "name": "traceLogId", "$ref": "TraceLogId", "optional": true, "description": "If given, trace log with the given ID was removed." }
+ ],
+ "description": "Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed."
+ }
+ ]
+ },
+ {
+ "domain": "Input",
+ "hidden": true,
+ "types": [],
+ "commands": [
+ {
+ "name": "dispatchKeyEvent",
+ "parameters": [
+ { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." },
+ { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
+ { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
+ { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp
and rawKeyDown
events (default: \"\")" },
+ { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." },
+ { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." },
+ { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." },
+ { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." },
+ { "name": "macCharCode", "type": "integer", "optional": true, "description": "Mac character code (default: 0)." },
+ { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." },
+ { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." },
+ { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." }
+ ],
+ "description": "Dispatches a key event to the page."
+ },
+ {
+ "name": "dispatchMouseEvent",
+ "parameters": [
+ { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." },
+ { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
+ { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
+ { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
+ { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
+ { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." },
+ { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
+ ],
+ "description": "Dispatches a mouse event to the page."
+ }
+ ],
"events": []
+ },
+ {
+ "domain": "LayerTree",
+ "hidden": true,
+ "types": [
+ {
+ "id": "LayerId",
+ "type": "string",
+ "description": "Unique RenderLayer identifier."
+ },
+ {
+ "id": "IntRect",
+ "type": "object",
+ "description": "A rectangle.",
+ "properties": [
+ { "name": "x", "type": "integer", "description": "The x position." },
+ { "name": "y", "type": "integer", "description": "The y position." },
+ { "name": "width", "type": "integer", "description": "The width metric." },
+ { "name": "height", "type": "integer", "description": "The height metric." }
+ ]
+ },
+ {
+ "id": "Layer",
+ "type": "object",
+ "description": "Information about a compositing layer.",
+ "properties": [
+ { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." },
+ { "name": "bounds", "$ref": "IntRect", "description": "Bounds of the layer." },
+ { "name": "isComposited", "type": "boolean", "description": "Indicates whether this layer is composited." },
+ { "name": "paintCount", "type": "integer", "optional": true, "description": "Indicates how many time this layer has painted." },
+ { "name": "memory", "type": "integer", "optional": true, "description": "Estimated memory used by this layer." },
+ { "name": "compositedBounds", "$ref": "IntRect", "optional": true, "description": "The bounds of the composited layer." },
+ { "name": "childLayers", "type": "array", "optional": true, "items": { "$ref": "Layer" }, "description": "Child layers." }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables compositing tree inspection."
+ },
+ {
+ "name": "disable",
+ "description": "Disables compositing tree inspection."
+ },
+ {
+ "name": "getLayerTree",
+ "description": "Returns the layer tree structure of the current page.",
+ "returns": [
+ { "name": "layerTree", "$ref": "Layer", "description": "Layer tree structure of the current page." }
+ ]
+ },
+ {
+ "name": "nodeIdForLayerId",
+ "description": "Returns the node id for a given layer id.",
+ "parameters": [
+ { "name": "layerId", "$ref": "LayerId" }
+ ],
+ "returns": [
+ { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The node id for the given layer id." }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "layerTreeDidChange"
+ }
+ ]
}]
}
diff --git a/src/LiveDevelopment/Inspector/inspector.html b/src/LiveDevelopment/Inspector/inspector.html
index 62e662b2c8e..c7036efa9e2 100644
--- a/src/LiveDevelopment/Inspector/inspector.html
+++ b/src/LiveDevelopment/Inspector/inspector.html
@@ -65,7 +65,9 @@
Unique object identifier.
+Event +Unique resource identifier.
+Unique trace log identifier.
+Checks if there is any uninstrumented canvas in the inspected page.
++// WebInspector Command: Canvas.hasUninstrumentedCanvases +Canvas.hasUninstrumentedCanvases(function callback(res) { + // res = {result} +}); ++
Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared.
+// WebInspector Command: Canvas.captureFrame -Canvas.captureFrame(function callback(res) { +Canvas.captureFrame(frameId, function callback(res) { // res = {traceLogId} });
Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command.
++// WebInspector Command: Canvas.startCapturing +Canvas.startCapturing(frameId, function callback(res) { + // res = {traceLogId} +}); ++
+// WebInspector Command: Canvas.stopCapturing +Canvas.stopCapturing(traceLogId); ++
// WebInspector Command: Canvas.getTraceLog -Canvas.getTraceLog(traceLogId, function callback(res) { +Canvas.getTraceLog(traceLogId, startOffset, maxLength, function callback(res) { // res = {traceLog} });@@ -1635,17 +1818,89 @@
// WebInspector Command: Canvas.replayTraceLog Canvas.replayTraceLog(traceLogId, stepNo, function callback(res) { - // res = {screenshotDataUrl} + // res = {resourceState} });
+// WebInspector Command: Canvas.getResourceInfo +Canvas.getResourceInfo(resourceId, function callback(res) { + // res = {resourceInfo} +}); ++
+// WebInspector Command: Canvas.getResourceState +Canvas.getResourceState(traceLogId, resourceId, function callback(res) { + // res = {resourceState} +}); ++
Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command).
++// WebInspector Event: Canvas.contextCreated +function onContextCreated(res) { + // res = {frameId} +} ++
Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed.
++// WebInspector Event: Canvas.traceLogsRemoved +function onTraceLogsRemoved(res) { + // res = {frameId, traceLogId} +} ++
Attr
's name.Attr
's value.Requests that children of the node with given id are returned to the caller in form of setChildNodes
events.
Requests that children of the node with given id are returned to the caller in form of setChildNodes
events where not only immediate children are retrieved, but all children down to the specified depth.
// WebInspector Command: DOM.requestChildNodes -DOM.requestChildNodes(nodeId); +DOM.requestChildNodes(nodeId, depth);
Highlights DOM node with given id.
+Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
// WebInspector Command: DOM.highlightNode -DOM.highlightNode(nodeId, highlightConfig); +DOM.highlightNode(highlightConfig, nodeId, objectId);
Focuses the given element.
++// WebInspector Command: DOM.focus +DOM.focus(nodeId); ++
Fired when Document
has been totally updated. Node ids are no longer valid.
-// WebInspector Event: DOMStorage.domStorageUpdated -function onDomStorageUpdated(res) { +// WebInspector Event: DOMStorage.domStorageItemsCleared +function onDomStorageItemsCleared(res) { // res = {storageId} }
+// WebInspector Event: DOMStorage.domStorageItemRemoved +function onDomStorageItemRemoved(res) { + // res = {storageId, key} +} ++
+// WebInspector Event: DOMStorage.domStorageItemAdded +function onDomStorageItemAdded(res) { + // res = {storageId, key, newValue} +} ++
+// WebInspector Event: DOMStorage.domStorageItemUpdated +function onDomStorageItemUpdated(res) { + // res = {storageId, key, oldValue, newValue} +} ++
Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually.
++// WebInspector Command: Debugger.setVariableValue +Debugger.setVariableValue(callFrameId, functionObjectId, scopeNumber, variableName, newValue); ++
Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.
@@ -4045,9 +4401,9 @@Data entry.
Dispatches a key event to the page.
+keyUp
and rawKeyDown
events (default: "")+// WebInspector Command: Input.dispatchKeyEvent +Input.dispatchKeyEvent(type, modifiers, timestamp, text, unmodifiedText, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, macCharCode, autoRepeat, isKeypad, isSystemKey); ++
Dispatches a mouse event to the page.
++// WebInspector Command: Input.dispatchMouseEvent +Input.dispatchMouseEvent(type, x, y, modifiers, timestamp, button, clickCount); ++
Unique RenderLayer identifier.
+A rectangle.
+Information about a compositing layer.
+Enables compositing tree inspection.
++// WebInspector Command: LayerTree.enable +LayerTree.enable(); ++
Disables compositing tree inspection.
++// WebInspector Command: LayerTree.disable +LayerTree.disable(); ++
Returns the layer tree structure of the current page.
++// WebInspector Command: LayerTree.getLayerTree +LayerTree.getLayerTree(function callback(res) { + // res = {layerTree} +}); ++
Returns the node id for a given layer id.
++// WebInspector Command: LayerTree.nodeIdForLayerId +LayerTree.nodeIdForLayerId(layerId, function callback(res) { + // res = {nodeId} +}); ++
+// WebInspector Event: LayerTree.layerTreeDidChange +function onLayerTreeDidChange(res) { + // res = {} +} ++
Number of nodes with given name.
@@ -4313,6 +4870,19 @@+// WebInspector Command: Memory.getDOMCounters +Memory.getDOMCounters(function callback(res) { + // res = {documents, nodes, jsEventListeners} +}); ++
// WebInspector Command: Memory.getProcessMemoryDistribution -Memory.getProcessMemoryDistribution(function callback(res) { +Memory.getProcessMemoryDistribution(reportGraph, function callback(res) { // res = {distribution} });
+// WebInspector Event: Memory.addNativeSnapshotChunk +function onAddNativeSnapshotChunk(res) { + // res = {chunk} +} ++
HTTP response data.
WebSocket request data.
Information about the cached resource.
// WebInspector Command: Page.reload -Page.reload(ignoreCache, scriptToEvaluateOnLoad); +Page.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor);
Deletes browser cookie with given name for the given domain.
+Deletes browser cookie with given name, domain and path.
// WebInspector Command: Page.deleteCookie -Page.deleteCookie(cookieName, domain); +Page.deleteCookie(cookieName, url);
Tells if backend supports debug borders on layers
++// WebInspector Command: Page.canShowDebugBorders +Page.canShowDebugBorders(function callback(res) { + // res = {show} +}); ++
Requests that backend shows debug borders on layers
++// WebInspector Command: Page.setShowDebugBorders +Page.setShowDebugBorders(show); ++
Tells if backend supports a FPS counter display
++// WebInspector Command: Page.canShowFPSCounter +Page.canShowFPSCounter(function callback(res) { + // res = {show} +}); ++
Requests that backend shows the FPS counter
++// WebInspector Command: Page.setShowFPSCounter +Page.setShowFPSCounter(show); ++
Tells if backend supports continuous painting
++// WebInspector Command: Page.canContinuouslyPaint +Page.canContinuouslyPaint(function callback(res) { + // res = {value} +}); ++
Requests that backend enables continuous painting
++// WebInspector Command: Page.setContinuousPaintingEnabled +Page.setContinuousPaintingEnabled(enabled); ++
Determines if scripts can be executed in the page.
@@ -5526,6 +6233,19 @@Emulates the given media for CSS media queries.
++// WebInspector Command: Page.setEmulatedMedia +Page.setEmulatedMedia(media); ++
Indicates the visibility of compositing borders.
@@ -5555,6 +6275,35 @@Capture page screenshot.
++// WebInspector Command: Page.captureScreenshot +Page.captureScreenshot(function callback(res) { + // res = {data} +}); ++
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
++// WebInspector Command: Page.handleJavaScriptDialog +Page.handleJavaScriptDialog(accept); ++
Fired when frame has started loading.
++// WebInspector Event: Page.frameStartedLoading +function onFrameStartedLoading(res) { + // res = {frameId} +} ++
Fired when frame has stopped loading.
++// WebInspector Event: Page.frameStoppedLoading +function onFrameStoppedLoading(res) { + // res = {frameId} +} ++
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
++// WebInspector Event: Page.javascriptDialogOpening +function onJavascriptDialogOpening(res) { + // res = {message} +} ++
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
++// WebInspector Event: Page.javascriptDialogClosed +function onJavascriptDialogClosed(res) { + // res = {} +} ++
CPU Profile node. Holds callsite information, execution statistics and child nodes.
+Profile.
-// WebInspector Command: Profiler.getProfile -Profiler.getProfile(type, uid, function callback(res) { +// WebInspector Command: Profiler.getCPUProfile +Profiler.getCPUProfile(uid, function callback(res) { // res = {profile} });
+// WebInspector Command: Profiler.getHeapSnapshot +Profiler.getHeapSnapshot(uid); ++
// WebInspector Command: Profiler.takeHeapSnapshot -Profiler.takeHeapSnapshot(); +Profiler.takeHeapSnapshot(reportProgress);