2011-04-25 Pavel Feldman <pfeldman@google.com>
[WebKit-https.git] / Source / WebCore / inspector / Inspector.json
1 [
2     {
3         "domain": "Inspector",
4         "types": [],
5         "commands": [
6         ],
7         "events": [
8             {
9                 "name": "frontendReused"
10             },
11             {
12                 "name": "bringToFront"
13             },
14             {
15                 "name": "disconnectFromBackend"
16             },
17             {
18                 "name": "reset"
19             },
20             {
21                 "name": "showPanel",
22                 "parameters": [
23                     { "name": "panel", "type": "string" }
24                 ]
25             },
26             {
27                 "name": "startUserInitiatedDebugging"
28             },
29             {
30                 "name": "evaluateForTestInFrontend",
31                 "parameters": [
32                     { "name": "testCallId", "type": "integer" },
33                     { "name": "script", "type": "string" }
34                 ]
35             },
36             {
37                 "name": "inspect",
38                 "parameters": [
39                     { "name": "object", "$ref": "Runtime.RemoteObject" },
40                     { "name": "hints", "type": "object" }
41                 ]
42             },
43             {
44                 "name": "didCreateWorker",
45                 "parameters": [
46                     { "name": "id", "type": "integer" },
47                     { "name": "url", "type": "string" },
48                     { "name": "isShared", "type": "boolean" }
49                 ]
50             },
51             {
52                 "name": "didDestroyWorker",
53                 "parameters": [
54                     { "name": "id", "type": "integer" }
55                 ]
56             }
57         ]
58     },
59     {
60         "domain": "Page",
61         "description": "Actions and events related to the inspected page belong to the page domain.",
62         "types": [
63             {
64                 "id": "ResourceType",
65                 "type": "string",
66                 "enum": ["Document", "Stylesheet", "Image", "Font", "Script", "XHR", "WebSocket", "Other"],
67                 "description": "Resource type as it was perceived by the rendering enging."
68             },
69             {
70                 "id": "Frame",
71                 "type": "object",
72                 "description": "Information about the Frame on the page.",
73                 "properties": [
74                     { "name": "id", "type": "string", "description": "Frame unique identifier." },
75                     { "name": "parentId", "type": "string", "description": "Parent frame identifier." },
76                     { "name": "loaderId", "type": "string", "description": "Identifier of the loader associated with this frame." },
77                     { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." },
78                     { "name": "url", "type": "string", "description": "Frame document's URL." }
79                 ]
80             },
81             {
82                 "id": "FrameResourceTree",
83                 "type": "object",
84                 "description": "Information about the Frame hierarchy along with their cached resources.",
85                 "properties": [
86                     { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." },
87                     { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." },
88                     { "name": "resources", "type": "array",
89                         "items": {
90                             "type": "object",
91                             "properties": [
92                                 { "name": "url", "type": "string", "description": "Resource URL." },
93                                 { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }
94                             ]
95                         },
96                         "description": "Information about frame resources."
97                     }
98                 ]
99             }
100         ],
101         "commands": [
102             {
103                 "name": "addScriptToEvaluateOnLoad",
104                 "parameters": [
105                     { "name": "scriptSource", "type": "string" }
106                 ]
107             },
108             {
109                 "name": "removeAllScriptsToEvaluateOnLoad"
110             },
111             {
112                 "name": "reload",
113                 "parameters": [
114                     { "name": "ignoreCache", "type": "boolean", "optional": true }
115                 ],
116                 "description": "Reloads given page optionally ignoring the cache."
117             },
118             {
119                 "name": "open",
120                 "parameters": [
121                     { "name": "url", "type": "string", "description": "URL to open." },
122                     { "name": "newWindow", "optional": true, "type": "boolean", "description": "If True, opens given URL in a new window or tab." }
123                 ],
124                 "description": "Opens given URL either in the inspected page or in a new tab / window."
125             },
126             {
127                 "name": "getCookies",
128                 "returns": [
129                     { "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." },
130                     { "name": "cookiesString", "type": "string", "description": "document.cookie string representation of the cookies." }
131                 ],
132                 "description": "Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the <code>cookie</code> field or string cookie representation using <code>cookieString</code>."
133             },
134             {
135                 "name": "deleteCookie",
136                 "parameters": [
137                     { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
138                     { "name": "domain", "type": "string", "description": "Domain of the cookie to remove." }
139                 ],
140                 "description": "Deletes browser cookie with given name for the given domain."
141             },
142             {
143                 "name": "getResourceTree",
144                 "description": "Returns present frame / resource tree structure.",
145                 "returns": [
146                     { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." }
147                 ]
148             },
149             {
150                 "name": "getResourceContent",
151                 "description": "Returns content of the given resource.",
152                 "parameters": [
153                     { "name": "frameId", "type": "string", "description": "Frame id to get resource for." },
154                     { "name": "url", "type": "string", "description": "URL of the resource to get content for." },
155                     { "name": "base64Encode", "type": "boolean", "optional": true, "description": "Requests that resource content is served as base64." }
156                 ],
157                 "returns": [
158                     { "name": "content", "type": "string", "description": "Resource content." }
159                 ]
160             }
161         ],
162         "events": [
163             {
164                 "name": "inspectedURLChanged",
165                 "parameters": [
166                     { "name": "url", "type": "string" }
167                 ]
168             },
169             {
170                 "name": "domContentEventFired",
171                 "parameters": [
172                     { "name": "timestamp", "type": "number" }
173                 ]
174             },
175             {
176                 "name": "loadEventFired",
177                 "parameters": [
178                     { "name": "timestamp", "type": "number" }
179                 ]
180             },
181             {
182                 "name": "frameNavigated",
183                 "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
184                 "parameters": [
185                     { "name": "frame", "$ref": "Frame", "description": "Frame object." },
186                     { "name": "loaderId", "type": "string", "description": "Loader identifier." }
187                 ]
188             },
189             {
190                 "name": "frameDetached",
191                 "description": "Fired when frame has been detached from its parent.",
192                 "parameters": [
193                     { "name": "frameId", "type": "string", "description": "Id of the frame that has been detached." }
194                 ]
195             }
196         ]
197     },
198     {
199         "domain": "Runtime",
200         "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose type, string representation and unique identifier that can be used for further object interaction. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
201         "types": [
202             {
203                 "id": "RemoteObject",
204                 "type": "object",
205                 "description": "Mirror object referencing original JavaScript object.",
206                 "properties": [
207                     { "name": "description", "type": "string", "description": "String representation of the object." },
208                     { "name": "hasChildren", "type": "boolean", "optional": true, "description": "True when this object can be queried for children." },
209                     { "name": "objectId", "type": "string", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
210                     { "name": "type", "type": "string", "enum": ["object", "array", "function", "null", "node", "undefined", "string", "number", "boolean", "error", "regexp", "date"], "description": "Object type." }
211                 ]
212             },
213             {
214                 "id": "RemoteProperty",
215                 "type": "object",
216                 "description": "Mirror object property.",
217                 "properties": [
218                     { "name": "name", "type": "string", "description": "Property name." },
219                     { "name": "value", "$ref": "RemoteObject", "description": "Property value." },
220                     { "name": "isGetter", "type": "boolean", "optional": true, "description": "True if this property is getter." }
221                 ]
222             }
223         ],
224         "commands": [
225             {
226                 "name": "evaluate",
227                 "parameters": [
228                     { "name": "expression", "type": "string", "description": "Expression to evaluate." },
229                     { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
230                     { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." }
231                 ],
232                 "returns": [
233                     { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }
234                 ],
235                 "description": "Evaluate expression on global object."
236             },
237             {
238                 "name": "evaluateOn",
239                 "parameters": [
240                     { "name": "objectId", "type": "string", "description": "Identifier of the object to evaluate expression on." },
241                     { "name": "expression", "type": "string", "description": "Expression to evaluate." }
242                 ],
243                 "returns": [
244                     { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }
245                 ],
246                 "description": "Evaluate expression on given object using it as <code>this</code>."
247             },
248             {
249                 "name": "getProperties",
250                 "parameters": [
251                     { "name": "objectId", "type": "string", "description": "Identifier of the object to return properties for." },
252                     { "name": "ignoreHasOwnProperty", "type": "boolean", "description": "If true, returns properties belonging to any element of the prototype chain." }
253                 ],
254                 "returns": [
255                     { "name": "result", "type": "array", "items": { "$ref": "RemoteProperty"}, "description": "Object properties." }
256                 ],
257                 "description": "Returns properties of a given object."
258             },
259             {
260                 "name": "setPropertyValue",
261                 "parameters": [
262                     { "name": "objectId", "type": "string", "description": "Identifier of the object to set property on." },
263                     { "name": "propertyName", "type": "string", "description": "Property name to set value for." },
264                     { "name": "expression", "type": "string", "description": "Expression to evaluate." }
265                 ],
266                 "description": "Makes property with given name equal to the expression evaluation result."
267             },
268             {
269                 "name": "releaseObject",
270                 "parameters": [
271                     { "name": "objectId", "type": "string", "description": "Identifier of the object to release." }
272                 ],
273                 "description": "Releases remote object with given id."
274             },
275             {
276                 "name": "releaseObjectGroup",
277                 "parameters": [
278                     { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
279                 ],
280                 "description": "Releases all remote objects that belong to a given group."
281             }
282         ]
283     },
284     {
285         "domain": "Console",
286         "description": "Console domain defines methods and events for interaction with the JavaScript console. One needs to enable this domain using <code>enable</code> function in order to start receiving the console messages.",
287         "types": [
288             {
289                 "id": "ConsoleMessage",
290                 "type": "object",
291                 "description": "Console message.",
292                 "properties": [
293                     { "name": "source", "type": "string", "enum": ["html", "wml", "xml", "javascript", "css", "other"], "description": "Message source." },
294                     { "name": "type", "type": "string", "enum": ["log", "other", "trace", "startGroup", "startGroupCollapsed", "endGroup", "assert", "uncaughtException", "networkError", "result"], "description": "Message type." },
295                     { "name": "level", "type": "string", "enum": ["tip", "log", "warning", "error", "debug"], "description": "Message severity." },
296                     { "name": "line", "type": "integer", "description": "JavaScript source line that created console message." },
297                     { "name": "url", "type": "string", "description": "JavaScript source url that created console message." },
298                     { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
299                     { "name": "text", "type": "string", "description": "Message text." },
300                     { "name": "networkIdentifier", "type": "integer", "optional": true, "description": "Identifier of the network request associated with the console message." },
301                     { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "description": "Message parameters in case of the formatted message." },
302                     { "name": "stackTrace", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "Call frames for assert and error messages." }
303                 ]
304             },
305             {
306                 "id": "CallFrame",
307                 "type": "object",
308                 "description": "Stack entry for console errors and assertions.",
309                 "properties": [
310                     { "name": "functionName", "type": "string", "description": "JavaScript function name." },
311                     { "name": "url", "type": "string", "description": "JavaScript source name / url." },
312                     { "name": "lineNumber", "type": "string", "description": "JavaScript source line number." },
313                     { "name": "columnNumber", "type": "string", "description": "JavaScript source column number." }
314                 ]
315             }
316         ],
317         "commands": [
318             {
319                 "name": "enable",
320                 "returns": [
321                     { "name": "expiredMessagesCount", "type": "integer", "description": "Number of messages cleared due to message threashold overflow." }
322                 ],
323                 "description": "Enables console domain, sends all the messages collected so far to the client." 
324             },
325             {
326                 "name": "disable",
327                 "description": "Disables console domain, prevents further console messages from being sent to the client." 
328             },
329             {
330                 "name": "clearConsoleMessages",
331                 "description": "Clears collected console messages." 
332             },
333             {
334                 "name": "setMonitoringXHREnabled",
335                 "parameters": [
336                     { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
337                 ],
338                 "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued." 
339             },
340             {
341                 "name": "addInspectedNode",
342                 "parameters": [
343                     { "name": "nodeId", "type": "integer", "description": "DOM node id to be accessible by means of $x command line API." }
344                 ],
345                 "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." 
346             }
347         ],
348         "events": [
349             {
350                 "name": "messageAdded",
351                 "parameters": [
352                     { "name": "messageObj", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
353                 ],
354                 "description": "Issued for each console message added."
355             },
356             {
357                 "name": "messageRepeatCountUpdated",
358                 "parameters": [
359                     { "name": "count", "type": "integer", "description": "New repeat count value." }
360                 ],
361                 "description": "In case of subsequent message being equal to the previous one, only repeat count is being updated."
362             },
363             {
364                 "name": "messagesCleared",
365                 "description": "Issued when console is cleared."
366             }
367         ]
368     },
369     {
370         "domain": "Network",
371         "description": "Network domain allows tracking network activities of the page. It exposes information about HTTP and WebSocket requests and responses, their headers, bodies, timing, etc. It also allows getting the tree of the Frames on the page along with information about their resources.",
372         "types": [
373             {
374                 "id": "ResourceTiming",
375                 "type": "object",
376                 "description": "Timing information for the request.",
377                 "properties": [
378                     { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." },
379                     { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." },
380                     { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." },
381                     { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." },
382                     { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." },
383                     { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." },
384                     { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." },
385                     { "name": "sslStart", "type": "number", "description": "Started SSL handshake." },
386                     { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." },
387                     { "name": "sendStart", "type": "number", "description": "Started sending request." },
388                     { "name": "sendEnd", "type": "number", "description": "Finished sending request." },
389                     { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." }
390                 ]
391             },
392             {
393                 "id": "ResourceRequest",
394                 "type": "object",
395                 "description": "HTTP request data.",
396                 "properties": [
397                     { "name": "url", "type": "string", "description": "Request URL." },
398                     { "name": "method", "type": "string", "description": "HTTP request method." },
399                     { "name": "headers", "type": "object", "description": "HTTP request headers." },
400                     { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }
401                 ]
402             },
403             {
404                 "id": "ResourceResponse",
405                 "type": "object",
406                 "description": "HTTP response data.",
407                 "properties": [
408                     { "name": "status", "type": "number", "description": "HTTP response status code." },
409                     { "name": "statusText", "type": "string", "description": "HTTP response status text." },
410                     { "name": "headers", "type": "object", "description": "HTTP response headers." },
411                     { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." },
412                     { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
413                     { "name": "requestHeaders", "type": "object", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
414                     { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." },
415                     { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." },
416                     { "name": "connectionID", "type": "number", "description": "Physical connection id that was actually used for this request." },
417                     { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the resource was loaded from the disk cache." },
418                     { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }
419                 ]
420             },
421             {
422                 "id": "CachedResource",
423                 "type": "object",
424                 "description": "Information about the cached resource.",
425                 "properties": [
426                     { "name": "url", "type": "string", "description": "Resource URL." },
427                     { "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
428                     { "name": "response", "$ref": "ResourceResponse", "description": "Cached response data." },
429                     { "name": "bodySize", "type": "number", "description": "Cached response body size." }
430                 ]
431             }
432         ],
433         "commands": [
434             {
435                 "name": "enable",
436                 "description": "Enables network tracking, network events will now be delivered to the client."
437             },
438             {
439                 "name": "disable",
440                 "description": "Disables network tracking, prevents network events from being sent to the client."
441             },
442             {
443                 "name": "setUserAgentOverride",
444                 "description": "Allows overriding user agent with the given string.",
445                 "parameters": [
446                     { "name": "userAgent", "type": "string", "description": "User agent to use." }
447                 ]
448             },
449             {
450                 "name": "setExtraHeaders",
451                 "description": "Allows sending extra HTTP headers with the requests from this page.",
452                 "parameters": [
453                     { "name": "headers", "type": "object", "description": "Map with extra HTTP headers." }
454                 ]
455             }
456         ],
457         "events": [
458             {
459                 "name": "requestWillBeSent",
460                 "description": "Fired when page is about to send HTTP request.",
461                 "parameters": [
462                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
463                     { "name": "frameId", "type": "string", "description": "Frame identifier." },
464                     { "name": "loaderId", "type": "string", "description": "Loader identifier." },
465                     { "name": "documentURL", "type": "string", "description": "URL of the document this resource is loaded for." },
466                     { "name": "request", "$ref": "ResourceRequest", "description": "Request data." },
467                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
468                     { "name": "stackTrace", "type": "array", "items": { "$ref": "Console.CallFrame"}, "description": "JavaScript stack trace upon issuing this request." },
469                     { "name": "redirectResponse", "optional": true, "$ref": "ResourceResponse", "description": "Redirect response data." }
470                 ]
471             },
472             {
473                 "name": "resourceMarkedAsCached",
474                 "description": "Fired when request is known to be served from disk cache.",
475                 "parameters": [
476                     { "name": "identifier", "type": "integer", "description": "Request identifier." }
477                 ]
478             },
479             {
480                 "name": "responseReceived",
481                 "description": "Fired when HTTP response is available.",
482                 "parameters": [
483                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
484                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
485                     { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
486                     { "name": "response", "$ref": "ResourceResponse", "description": "Response data." }
487                 ]
488             },
489             {
490                 "name": "dataReceived",
491                 "description": "Fired when data chunk was received over the network.",
492                 "parameters": [
493                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
494                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
495                     { "name": "dataLength", "type": "integer", "description": "Data chunk length." },
496                     { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
497                 ]
498             },
499             {
500                 "name": "loadingFinished",
501                 "description": "Fired when HTTP request has finished loading.",
502                 "parameters": [
503                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
504                     { "name": "timestamp", "type": "number", "description": "Timestamp." }
505                 ]
506             },
507             {
508                 "name": "loadingFailed",
509                 "description": "Fired when HTTP request has failed to load.",
510                 "parameters": [
511                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
512                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
513                     { "name": "errorText", "type": "string", "description": "User friendly error message." },
514                     { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }
515                 ]
516             },
517             {
518                 "name": "resourceLoadedFromMemoryCache",
519                 "description": "Fired when HTTP request has been served from memory cache.",
520                 "parameters": [
521                     { "name": "frameId", "type": "string", "description": "Frame identifier." },
522                     { "name": "loaderId", "type": "string", "description": "Loader identifier." },
523                     { "name": "documentURL", "type": "string", "description": "URL of the document this resource is loaded for." },
524                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
525                     { "name": "resource", "$ref": "CachedResource", "description": "Cached resource data." }
526                 ]
527             },
528             {
529                 "name": "initialContentSet",
530                 "description": "Fired for XMLHttpRequests when their content becomes available.",
531                 "parameters": [
532                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
533                     { "name": "content", "type": "string", "description": "Resource content." },
534                     { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }
535                 ]
536             },
537             {
538                 "name": "webSocketWillSendHandshakeRequest",
539                 "description": "Fired when WebSocket is about to initiate handshake.",
540                 "parameters": [
541                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
542                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
543                     { "name": "request", "type": "object", "description": "WebSocket request data." }
544                 ]
545             },
546             {
547                 "name": "webSocketHandshakeResponseReceived",
548                 "description": "Fired when WebSocket handshake response becomes available.",
549                 "parameters": [
550                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
551                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
552                     { "name": "response", "type": "object", "description": "WebSocket response data." }
553                 ]
554             },
555             {
556                 "name": "webSocketCreated",
557                 "description": "Fired upon WebSocket creation.",
558                 "parameters": [
559                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
560                     { "name": "url", "type": "string", "description": "WebSocket request URL." }
561                 ]
562             },
563             {
564                 "name": "webSocketClosed",
565                 "description": "Fired when WebSocket is closed.",
566                 "parameters": [
567                     { "name": "identifier", "type": "integer", "description": "Request identifier." },
568                     { "name": "timestamp", "type": "number", "description": "Timestamp." }
569                 ]
570             }
571         ]
572     },
573     {
574         "domain": "Database",
575         "types": [],
576         "commands": [
577             {
578                 "name": "enable",
579                 "description": "Enables database tracking, database events will now be delivered to the client."
580             },
581             {
582                 "name": "disable",
583                 "description": "Disables database tracking, prevents database events from being sent to the client."
584             },
585             {
586                 "name": "getDatabaseTableNames",
587                 "parameters": [
588                     { "name": "databaseId", "type": "integer" }
589                 ],
590                 "returns": [
591                     { "name": "tableNames", "type": "array", "items": { "type": "string" } }
592                 ]
593             },
594             {
595                 "name": "executeSQL",
596                 "parameters": [
597                     { "name": "databaseId", "type": "integer" },
598                     { "name": "query", "type": "string" }
599                 ],
600                 "returns": [
601                     { "name": "success", "type": "boolean" },
602                     { "name": "transactionId", "type": "integer" }
603                 ]
604             }
605         ],
606         "events": [
607             {
608                 "name": "addDatabase",
609                 "parameters": [
610                     { "name": "database", "$ref": "DatabaseDatabase" }
611                 ]
612             },
613             {
614                 "name": "sqlTransactionSucceeded",
615                 "parameters": [
616                     { "name": "transactionId", "type": "integer" },
617                     { "name": "columnNames", "type": "array", "items": { "type": "string" } },
618                     { "name": "values", "type": "array", "items": { "type": "string or number" }}
619                 ]
620             },
621             {
622                 "name": "sqlTransactionFailed",
623                 "parameters": [
624                     { "name": "transactionId", "type": "integer" },
625                     { "name": "sqlError", "$ref": "DatabaseError" }
626                 ]
627             }
628         ]
629     },
630     {
631         "domain": "DOMStorage",
632         "types": [],
633         "commands": [
634             {
635                 "name": "getDOMStorageEntries",
636                 "parameters": [
637                     { "name": "storageId", "type": "integer" }
638                 ],
639                 "returns": [
640                     { "name": "entries", "type": "array", "items": { "$ref": "DOMStorageEntry"} }
641                 ]
642             },
643             {
644                 "name": "setDOMStorageItem",
645                 "parameters": [
646                     { "name": "storageId", "type": "integer" },
647                     { "name": "key", "type": "string" },
648                     { "name": "value", "type": "string" }
649                 ],
650                 "returns": [
651                     { "name": "success", "type": "boolean" }
652                 ]
653             },
654             {
655                 "name": "removeDOMStorageItem",
656                 "parameters": [
657                     { "name": "storageId", "type": "integer" },
658                     { "name": "key", "type": "string" }
659                 ],
660                 "returns": [
661                     { "name": "success", "type": "boolean" }
662                 ]
663             }
664         ],
665         "events": [
666             {
667                 "name": "addDOMStorage",
668                 "parameters": [
669                     { "name": "storage", "$ref": "DOMStorageStorage" }
670                 ]
671             },
672             {
673                 "name": "updateDOMStorage",
674                 "parameters": [
675                     { "name": "storageId", "type": "integer" }
676                 ]
677             }
678         ]
679     },
680     {
681         "domain": "ApplicationCache",
682         "types": [],
683         "commands": [
684             {
685                 "name": "getApplicationCaches",
686                 "returns": [
687                     { "name": "applicationCaches", "$ref": "AppCache" }
688                 ]
689             }
690         ],
691         "events": [
692             {
693                 "name": "updateApplicationCacheStatus",
694                 "parameters": [
695                     { "name": "status", "type": "integer" }
696                 ]
697             },
698             {
699                 "name": "updateNetworkState",
700                 "parameters": [
701                     { "name": "isNowOnline", "type": "boolean" }
702                 ]
703             }
704         ]
705     },
706     {
707         "domain": "DOM",
708         "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, convert it into the JavaScript object, 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.",
709         "types": [
710             {
711                 "id": "DOMNode",
712                 "type": "object",
713                 "properties": [
714                     { "name": "id", "type": "integer", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." },
715                     { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." },
716                     { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." },
717                     { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." },
718                     { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." },
719                     { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." },
720                     { "name": "children", "type": "array", "optional": true, "items": { "$ref": "DOMNode" }, "description": "Child nodes of this node when requested with children." },
721                     { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." },
722                     { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." },
723                     { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId. // FIXME" },
724                     { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId. // FIXME" },
725                     { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset. // FIXME" },
726                     { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name. // FIXME" },
727                     { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value. // FIXME" }
728                 ],
729                 "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
730             },
731             {
732                 "id": "DOMEventListener",
733                 "type": "object",
734                 "properties": [
735                     { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." },
736                     { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." },
737                     { "name": "isAttribute", "type": "boolean", "description": "<code>EventListener</code>'s isAttribute." },
738                     { "name": "nodeId", "type": "integer", "description": "Target <code>DOMNode</code> id." },
739                     { "name": "listenerBody", "type": "string", "description": "Listener function body." },
740                     { "name": "sourceName", "type": "string", "optional": true, "description": "Handler location source name." },
741                     { "name": "lineNumber", "type": "number", "optional": true, "description": "Handler location line number." }
742                 ],
743                 "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
744             }
745         ],
746         "commands": [
747             {
748                 "name": "getDocument",
749                 "returns": [
750                     { "name": "root", "$ref": "DOMNode", "description": "Resulting node." }
751                 ],
752                 "description": "Returns the root DOM node to the caller."
753             },
754             {
755                 "name": "getChildNodes",
756                 "parameters": [
757                     { "name": "nodeId", "type": "integer", "description": "Id of the node to get children for." }
758                 ],
759                 "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events."
760             },
761             {
762                 "name": "querySelector",
763                 "parameters": [
764                     { "name": "nodeId", "type": "integer", "description": "Id of the node to query upon." },
765                     { "name": "selectors", "type": "string", "description": "Selector string." }
766                 ],
767                 "returns": [
768                     { "name": "nodeId", "type": "integer", "description": "Query selector result." }
769                 ],
770                 "description": "Executes <code>querySelector</code> on a given node. Setting <code>documentWide</code> to true starts selecting from the document node."
771             },
772             {
773                 "name": "querySelectorAll",
774                 "parameters": [
775                     { "name": "nodeId", "type": "integer", "description": "Id of the node to query upon." },
776                     { "name": "selectors", "type": "string", "description": "Selector string." }
777                 ],
778                 "returns": [
779                     { "name": "nodeIds", "type": "array", "items": { "type": "integer" }, "description": "Query selector result." }
780                 ],
781                 "description": "Executes <code>querySelectorAll</code> on a given node. Setting <code>documentWide</code> to true starts selecting from the document node."
782             },
783             {
784                 "name": "setNodeName",
785                 "parameters": [
786                     { "name": "nodeId", "type": "integer", "description": "Id of the node to set name for." },
787                     { "name": "name", "type": "string", "description": "New node's name." }
788                 ],
789                 "returns": [
790                     { "name": "outNodeId", "type": "integer", "description": "New node's id." }
791                 ],
792                 "description": "Sets node name for a node with given id."
793             },
794             {
795                 "name": "setNodeValue",
796                 "parameters": [
797                     { "name": "nodeId", "type": "integer", "description": "Id of the node to set value for." },
798                     { "name": "value", "type": "string", "description": "New node's value." }
799                 ],
800                 "description": "Sets node value for a node with given id."
801             },
802             {
803                 "name": "removeNode",
804                 "parameters": [
805                     { "name": "nodeId", "type": "integer", "description": "Id of the node to remove." }
806                 ],
807                 "description": "Removes node with given id."
808             },
809             {
810                 "name": "setAttribute",
811                 "parameters": [
812                     { "name": "nodeId", "type": "integer", "description": "Id of the element to set attribute for." },
813                     { "name": "name", "type": "string", "description": "Attribute name." },
814                     { "name": "value", "type": "string", "description": "Attribute value." }
815                 ],
816                 "description": "Sets attribute for an element with given id."
817             },
818             {
819                 "name": "removeAttribute",
820                 "parameters": [
821                     { "name": "nodeId", "type": "integer", "description": "Id of the element to remove attribute from." },
822                     { "name": "name", "type": "string", "description": "Name of the attribute to remove." }
823                 ],
824                 "description": "Removes attribute with given name from an element with given id."
825             },
826             {
827                 "name": "getEventListenersForNode",
828                 "parameters": [
829                     { "name": "nodeId", "type": "integer", "description": "Id of the node to get listeners for." }
830                 ],
831                 "returns": [
832                     { "name": "listeners", "type": "array", "items": { "$ref": "DOMEventListener"}, "description": "Array of relevant listeners." }
833                 ],
834                 "description": "Returns event listeners relevant to the node."
835             },
836             {
837                 "name": "copyNode",
838                 "parameters": [
839                     { "name": "nodeId", "type": "integer", "description": "Id of the node to copy." }
840                 ],
841                 "description": "Copies node's HTML markup into the clipboard."
842             },
843             {
844                 "name": "getOuterHTML",
845                 "parameters": [
846                     { "name": "nodeId", "type": "integer", "description": "Id of the node to get markup for." }
847                 ],
848                 "returns": [
849                     { "name": "outerHTML", "type": "string", "description": "Outer HTML markup." }
850                 ],
851                 "description": "Returns node's HTML markup."
852             },
853             {
854                 "name": "setOuterHTML",
855                 "parameters": [
856                     { "name": "nodeId", "type": "integer", "description": "Id of the node to set markup for." },
857                     { "name": "outerHTML", "type": "string", "description": "Outer HTML markup to set." }
858                 ],
859                 "returns": [
860                     { "name": "newNodeId", "type": "integer", "description": "Setting outer HTML can change node's id." }
861                 ],
862                 "description": "Sets node HTML markup, returns new node id."
863             },
864             {
865                 "name": "performSearch",
866                 "parameters": [
867                     { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." },
868                     { "name": "runSynchronously", "type": "boolean", "optional": true, "description": "When set to true, performing search synchronously (can block user interaction)." }
869                 ],
870                 "description": "Starts asynchronous search for a given string in the DOM tree. Use <code>cancelSearch</code> to stop given asynchronous search task."
871             },
872             {
873                 "name": "cancelSearch",
874                 "description": "Cancels asynchronous search started with <code>performSearch</code>."
875             },
876             {
877                 "name": "pushNodeToFrontend",
878                 "parameters": [
879                     { "name": "objectId", "type": "string", "description": "JavaScript object id to convert into node." }
880                 ],
881                 "returns": [
882                     { "name": "nodeId", "type": "integer", "description": "Node id for given object." }
883                 ],
884                 "description": "Requests that the node is sent to the caller given the JavaScript node object reference."
885             },
886             {
887                 "name": "setInspectModeEnabled",
888                 "parameters": [
889                     { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." }
890                 ],
891                 "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspect' command upon element selection."
892             },
893             {
894                 "name": "highlightNode",
895                 "parameters": [
896                     { "name": "nodeId", "type": "integer", "description": "Identifier of the node to highlight" },
897                     { "name": "mode", "type": "string", "enum": ["all", "content", "padding", "border", "margin"], "optional": true, "description": "The box model component(s) to highlight (default: \"all\")." },
898                 ],
899                 "description": "Highlights DOM node with given id."
900             },
901             {
902                 "name": "hideNodeHighlight",
903                 "description": "Hides DOM node highlight."
904             },
905             {
906                 "name": "highlightFrame",
907                 "parameters": [
908                     { "name": "frameId", "type": "string", "description": "Identifier of the frame to highlight" }
909                 ],
910                 "description": "Highlights owner element of the frame with given id."
911             },
912             {
913                 "name": "hideFrameHighlight",
914                 "description": "Hides frame owner highlight."
915             },
916             {
917                 "name": "pushNodeByPathToFrontend",
918                 "parameters": [
919                     { "name": "path", "type": "string", "description": "Path to node in the proprietary format." }
920                 ],
921                 "returns": [
922                     { "name": "nodeId", "type": "integer", "description": "Id of the node for given path." }
923                 ],
924                 "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath"
925             },
926             {
927                 "name": "resolveNode",
928                 "parameters": [
929                     { "name": "nodeId", "type": "integer", "description": "Id of the node to resolve." }
930                 ],
931                 "returns": [
932                     { "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." }
933                 ],
934                 "description": "Resolves JavaScript node object for given node id."
935             }
936         ],
937         "events": [
938             {
939                 "name": "documentUpdated",
940                 "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid."
941             },
942             {
943                 "name": "setChildNodes",
944                 "parameters": [
945                     { "name": "parentId", "type": "integer", "description": "Parent node id to populate with children." },
946                     { "name": "nodes", "type": "array", "items": { "$ref": "DOMNode"}, "description": "Child nodes array." }
947                 ],
948                 "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids."
949             },
950             {
951                 "name": "attributesUpdated",
952                 "parameters": [
953                     { "name": "id", "type": "integer", "description": "Id of the node that has changed." },
954                     { "name": "attributes", "type": "array", "items": { "$ref": "DOMAttribute"}, "description": "New attributes value." }
955                 ],
956                 "description": "Fired when <code>Element</code>'s attributes are updated."
957             },
958             {
959                 "name": "characterDataModified",
960                 "parameters": [
961                     { "name": "id", "type": "integer", "description": "Id of the node that has changed." },
962                     { "name": "newValue", "type": "string", "description": "New text value." }
963                 ],
964                 "description": "Mirrors <code>DOMCharacterDataModified</code> event."
965             },
966             {
967                 "name": "childNodeCountUpdated",
968                 "parameters": [
969                     { "name": "id", "type": "integer", "description": "Id of the node that has changed." },
970                     { "name": "newValue", "type": "integer", "description": "New node count." }
971                 ],
972                 "description": "Fired when <code>Container</code>'s child node count has changed."
973             },
974             {
975                 "name": "childNodeInserted",
976                 "parameters": [
977                     { "name": "parentId", "type": "integer", "description": "Id of the node that has changed." },
978                     { "name": "prevId", "type": "integer", "description": "If of the previous siblint." },
979                     { "name": "node", "$ref": "DOMNode", "description": "Inserted node data." }
980                 ],
981                 "description": "Mirrors <code>DOMNodeInserted</code> event."
982             },
983             {
984                 "name": "childNodeRemoved",
985                 "parameters": [
986                     { "name": "parentId", "type": "integer", "description": "Parent id." },
987                     { "name": "id", "type": "integer", "description": "Id of the node that has been removed." }
988                 ],
989                 "description": "Mirrors <code>DOMNodeRemoved</code> event."
990             },
991             {
992                 "name": "searchResults",
993                 "parameters": [
994                     { "name": "nodeIds", "type": "array", "items": { "type": "integer" }, "description": "Ids of the search result nodes." }
995                 ],
996                 "description": "Pushes search results initiated using <code>performSearch</code> to the client."
997             }
998         ]
999     },
1000     {
1001         "domain": "CSS",
1002         "description": "This domain exposes CSS read/write operations. All CSS objects, like stylesheets, rules, and styles, have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). Alternatively, a client can discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.",
1003         "types": [
1004             {
1005                 "id": "CSSStyleId",
1006                 "type": "object",
1007                 "properties": [
1008                     { "name": "styleSheetId", "type": "string", "description": "Enclosing stylesheet identifier." },
1009                     { "name": "ordinal", "type": "integer", "description": "The style ordinal within the stylesheet." }
1010                 ],
1011                 "description": "This object identifies a CSS style in a unique way."
1012             },
1013             {
1014                 "id": "CSSRuleId",
1015                 "type": "object",
1016                 "properties": [
1017                     { "name": "styleSheetId", "type": "string", "description": "Enclosing stylesheet identifier." },
1018                     { "name": "ordinal", "type": "integer", "description": "The rule ordinal within the stylesheet." }
1019                 ],
1020                 "description": "This object identifies a CSS rule in a unique way."
1021             },
1022             {
1023                 "id": "CSSNodeStyles",
1024                 "type": "object",
1025                 "properties": [
1026                     { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The node's inline style, if any." },
1027                     { "name": "computedStyle", "$ref": "CSSComputedStyle", "description": "The node's computed style." },
1028                     { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "CSSRule" }, "description": "CSS rules matching this node, from all applicable stylesheets." },
1029                     { "name": "styleAttributes", "type": "array", "items": { "$ref": "CSSStyleAttribute" }, "description": "Entries for style-related element attributes (e.g. width=20)."},
1030                     { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoIdRules" }, "description": "Pseudo style rules for this node." },
1031                     { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." }
1032                 ],
1033                 "description": "A holder for all CSS styles applicable to a particular DOM node."
1034             },
1035             {
1036                 "id": "PseudoIdRules",
1037                 "type": "object",
1038                 "properties": [
1039                     { "name": "pseudoId", "type": "integer", "description": "Pseudo style identifier (see <code>enum PseudoId</code> in <code>RenderStyleConstants.h</code>)."},
1040                     { "name": "rules", "type": "array", "items": { "$ref": "CSSRule" }, "description": "CSS rules applicable to the pseudo style."}
1041                 ],
1042                 "description": "CSS rule collection for a single pseudo style."
1043             },
1044             {
1045                 "id": "InheritedStyleEntry",
1046                 "type": "object",
1047                 "properties": [
1048                     { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." },
1049                     { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "CSSRule" }, "description": "CSS rules matching the ancestor node in the style inheritance chain." }
1050                 ],
1051                 "description": "CSS rule collection for a single pseudo style."
1052             },
1053             {
1054                 "id": "CSSStyleAttribute",
1055                 "type": "object",
1056                 "properties": [
1057                     { "name": "name", "type": "string", "description": "DOM attribute name (e.g. \"width\")."},
1058                     { "name": "style", "$ref": "CSSStyle", "description": "CSS style generated by the respective DOM attribute."}
1059                 ],
1060                 "description": "CSS style information for a DOM style attribute."
1061             },
1062             {
1063                 "id": "CSSStyleSheetHeader",
1064                 "type": "object",
1065                 "properties": [
1066                     { "name": "styleSheetId", "type": "string", "description": "The stylesheet identifier."},
1067                     { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."},
1068                     { "name": "title", "type": "string", "description": "Stylesheet title."},
1069                     { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."}
1070                 ],
1071                 "description": "CSS stylesheet metainformation."
1072             },
1073             {
1074                 "id": "CSSStyleSheetBody",
1075                 "type": "object",
1076                 "properties": [
1077                     { "name": "styleSheetId", "type": "string", "description": "The stylesheet identifier."},
1078                     { "name": "rules", "type": "array", "items": { "$ref": "CSSRule" }, "description": "Stylesheet resource URL."},
1079                     { "name": "text", "type": "string", "optional": true, "description": "Stylesheet resource contents (if available)."}
1080                 ],
1081                 "description": "CSS stylesheet contents."
1082             },
1083             {
1084                 "id": "CSSRule",
1085                 "type": "object",
1086                 "properties": [
1087                     { "name": "ruleId", "$ref": "CSSRuleId", "description": "The CSS rule identifier."},
1088                     { "name": "selectorText", "type": "string", "description": "Rule selector."},
1089                     { "name": "sourceURL", "type": "string", "optional": true, "description": "Parent stylesheet resource URL (for regular rules)."},
1090                     { "name": "sourceLine", "type": "integer", "description": "Line ordinal of the rule selector start character in the resource."},
1091                     { "name": "origin", "type": "string", "enum": ["user", "user-agent", "inspector", ""], "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 <code>addRule()</code>), \"\" for regular stylesheets."},
1092                     { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." },
1093                     { "name": "selectorRange", "$ref": "SourceRange", "optional": true, "description": "The rule selector range in the underlying resource (if available)." }
1094                 ],
1095                 "description": "CSS rule representation."
1096             },
1097             {
1098                 "id": "SourceRange",
1099                 "type": "object",
1100                 "properties": [
1101                     { "name": "start", "type": "integer", "description": "Start of range (inclusive)."},
1102                     { "name": "end", "type": "integer", "description": "End of range (exclusive)."}
1103                 ],
1104                 "description": "Text range within a resource."
1105             },
1106             {
1107                 "id": "CSSStyle",
1108                 "type": "object",
1109                 "properties": [
1110                     { "name": "styleId", "$ref": "CSSStyleId", "description": "The CSS style identifier."},
1111                     { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSProperty" }, "description": "CSS properties in the style."},
1112                     { "name": "shorthandEntries", "type": "array", "items": { "$ref": "ShorthandEntry" }, "description": "Computed values for all shorthands found in the style." },
1113                     { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available)."},
1114                     { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available)." },
1115                     { "name": "width", "type": "integer", "description": "The effective \"width\" property value from this style." },
1116                     { "name": "height", "type": "integer", "description": "The effective \"height\" property value from this style." }
1117                 ],
1118                 "description": "CSS style representation."
1119             },
1120             {
1121                 "id": "CSSProperty",
1122                 "type": "object",
1123                 "properties": [
1124                     { "name": "name", "type": "string", "description": "The property name." },
1125                     { "name": "value", "type": "string", "description": "The property value." },
1126                     { "name": "priority", "type": "string", "optional": true, "description": "The property priority (implies \"\" if absent)." },
1127                     { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies <code>false</code> if absent)." },
1128                     { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." },
1129                     { "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." },
1130                     { "name": "shorthandName", "type": "string", "description": "The related shorthand property name (absent if this property is not a longhand)." },
1131                     { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." }
1132                 ],
1133                 "description": "CSS style effective visual dimensions and source offsets."
1134             }
1135         ],
1136         "commands": [
1137             {
1138                 "name": "getStylesForNode",
1139                 "parameters": [
1140                     { "name": "nodeId", "type": "integer" }
1141                 ],
1142                 "returns": [
1143                     { "name": "styles", "$ref": "CSSNodeStyles", "description": "All styles for the specified DOM node." }
1144                 ],
1145                 "description": "Returns all styles for a DOM node identified by <code>nodeId</code>."
1146             },
1147             {
1148                 "name": "getComputedStyleForNode",
1149                 "parameters": [
1150                     { "name": "nodeId", "type": "integer" }
1151                 ],
1152                 "returns": [
1153                     { "name": "style", "$ref": "CSSStyle", "description": "Computed style for the specified DOM node." }
1154                 ],
1155                 "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>."
1156             },
1157             {
1158                 "name": "getInlineStyleForNode",
1159                 "parameters": [
1160                     { "name": "nodeId", "type": "integer" }
1161                 ],
1162                 "returns": [
1163                     { "name": "style", "$ref": "CSSStyle", "description": "Inline style for the specified DOM node." }
1164                 ],
1165                 "description": "Returns the inline style (if present) for a DOM node identified by <code>nodeId</code>."
1166             },
1167             {
1168                 "name": "getAllStyleSheets",
1169                 "returns": [
1170                     { "name": "headers", "type": "array", "items": { "$ref": "CSSStyleSheetHeader" }, "description": "Descriptor entries for all available stylesheets." }
1171                 ],
1172                 "description": "Returns metainfo entries for all known stylesheets."
1173             },
1174             {
1175                 "name": "getStyleSheet",
1176                 "parameters": [
1177                     { "name": "styleSheetId", "type": "string" }
1178                 ],
1179                 "returns": [
1180                     { "name": "styleSheet", "$ref": "CSSStyleSheetBody", "description": "Stylesheet contents for the specified <code>styleSheetId</code>." }
1181                 ],
1182                 "description": "Returns stylesheet data for the specified <code>styleSheetId</code>."
1183             },
1184             {
1185                 "name": "getStyleSheetText",
1186                 "parameters": [
1187                     { "name": "styleSheetId", "type": "string" }
1188                 ],
1189                 "returns": [
1190                     { "name": "text", "type": "string", "description": "The stylesheet text." }
1191                 ],
1192                 "description": "Returns the current textual content and the URL for a stylesheet."
1193             },
1194             {
1195                 "name": "setStyleSheetText",
1196                 "parameters": [
1197                     { "name": "styleSheetId", "type": "string" },
1198                     { "name": "text", "type": "string" }
1199                 ],
1200                 "description": "Sets the new stylesheet text, thereby invalidating all existing <code>CSSStyleId</code>'s and <code>CSSRuleId</code>'s contained by this stylesheet."
1201             },
1202             {
1203                 "name": "setPropertyText",
1204                 "parameters": [
1205                     { "name": "styleId", "$ref": "CSSStyleId" },
1206                     { "name": "propertyIndex", "type": "integer" },
1207                     { "name": "text", "type": "string" },
1208                     { "name": "overwrite", "type": "boolean" }
1209                 ],
1210                 "returns": [
1211                     { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property text modification." }
1212                 ],
1213                 "description": "Sets the new <code>text</code> for a property in the respective style, at offset <code>propertyIndex</code>. If <code>overwrite</code> is <code>true</code>, a property at the given offset is overwritten, otherwise inserted. <code>text</code> entirely replaces the property <code>name: value</code>."
1214             },
1215             {
1216                 "name": "toggleProperty",
1217                 "parameters": [
1218                     { "name": "styleId", "$ref": "CSSStyleId" },
1219                     { "name": "propertyIndex", "type": "integer" },
1220                     { "name": "disable", "type": "boolean" }
1221                 ],
1222                 "returns": [
1223                     { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property toggling." }
1224                 ],
1225                 "description": "Toggles the property in the respective style, at offset <code>propertyIndex</code>. The <code>disable</code> parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If <code>disable == false</code>, the property gets put back into its original place in the style declaration."
1226             },
1227             {
1228                 "name": "setRuleSelector",
1229                 "parameters": [
1230                     { "name": "ruleId", "$ref": "CSSRuleId" },
1231                     { "name": "selector", "type": "string" }
1232                 ],
1233                 "returns": [
1234                     { "name": "rule", "$ref": "CSSRule", "description": "The resulting rule after the selector modification." }
1235                 ],
1236                 "description": "Modifies the rule selector."
1237             },
1238             {
1239                 "name": "addRule",
1240                 "parameters": [
1241                     { "name": "contextNodeId", "type": "integer" },
1242                     { "name": "selector", "type": "string" }
1243                 ],
1244                 "returns": [
1245                     { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." }
1246                 ],
1247                 "description": "Creates a new empty rule with the given <code>selector</code> in a special \"inspector\" stylesheet in the owner document of the context node."
1248             },
1249             {
1250                 "name": "getSupportedCSSProperties",
1251                 "returns": [
1252                     { "name": "cssProperties", "type": "array", "items": { "type": "string" }, "description": "Supported property names." }
1253                 ],
1254                 "description": "Returns all supported CSS property names."
1255             }
1256         ]
1257     },
1258     {
1259         "domain": "Timeline",
1260         "description": "Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.",
1261         "types": [
1262             {
1263                 "id": "TimelineRecord",
1264                 "type": "object",
1265                 "properties": [
1266                     { "name": "type", "type": "string", "description": "Event type." },
1267                     { "name": "data", "type": "object", "description": "Event data." },
1268                     { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineRecord" }, "description": "Nested records." }
1269                 ],
1270                 "description": "Timeline record contains information about the recorded activity."
1271             }
1272         ],
1273         "commands": [
1274             {
1275                 "name": "start",
1276                 "description": "Starts capturing instrumentation events."
1277             },
1278             {
1279                 "name": "stop",
1280                 "description": "Stops capturing instrumentation events."
1281             }
1282         ],
1283         "events": [
1284             {
1285                 "name": "started",
1286                 "description": "Fired when timeline has been started."
1287             },
1288             {
1289                 "name": "stopped",
1290                 "description": "Fired when timeline has been stopped."
1291             },
1292             {
1293                 "name": "eventRecorded",
1294                 "parameters": [
1295                     { "name": "record", "$ref": "TimelineRecord", "description": "Timeline record data." }
1296                 ],
1297                 "description": "Fired for every instrumentation event while timeline is started."
1298             }
1299         ]
1300     },
1301     {
1302         "domain": "Debugger",
1303         "description": "Debugger domain exposes JavaScript debugging functions. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
1304         "types": [
1305             {
1306                 "id": "Location",
1307                 "type": "object",
1308                 "properties": [
1309                     { "name": "sourceID", "type": "string", "description": "Script identifier as reported by the <code>scriptParsed</code>" },
1310                     { "name": "lineNumber", "type": "integer", "description": "Line number in the script." },
1311                     { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script." }
1312                 ],
1313                 "description": "Location in the source code."
1314             },
1315             {
1316                 "id": "CallFrame",
1317                 "type": "object",
1318                 "properties": [
1319                     { "name": "id", "type": "string", "description": "Call frame identifier." },
1320                     { "name": "functionName", "type": "string", "description": "Name of the function called on this frame." },
1321                     { "name": "location", "$ref": "Location", "description": "Location in the source code." },
1322                     { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for given call frame." }
1323                 ],
1324                 "description": "Debugger call frame. Array of call frames form call stack."
1325             },
1326             {
1327                 "id": "Scope",
1328                 "type": "object",
1329                 "properties": [
1330                     { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch"], "description": "Scope type." },
1331                     { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope." },
1332                     { "name": "this", "$ref": "Runtime.RemoteObject", "optional": true, "description": "<code>this</code> object for local scope." }
1333                 ],
1334                 "description": "Debugger call frame. Array of call frames form call stack."
1335             }
1336         ],
1337         "commands": [
1338             {
1339                 "name": "enable",
1340                 "description": "Enables debugger for given page."
1341             },
1342             {
1343                 "name": "disable",
1344                 "description": "Disables debugger for given page."
1345             },
1346             {
1347                 "name": "setBreakpointsActive",
1348                 "parameters": [
1349                     { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
1350                 ],
1351                 "description": "Activates / deactivates all breakpoints on the page."
1352             },
1353             {
1354                 "name": "setBreakpointByUrl",
1355                 "parameters": [
1356                     { "name": "url", "type": "string", "description": "URL of the resource to set breakpoint on." },
1357                     { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
1358                     { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
1359                     { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
1360                 ],
1361                 "returns": [
1362                     { "name": "breakpointId", "type": "string", "description": "Id of the created breakpoint for further manipulations." },
1363                     { "name": "locations", "optional": true, "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into." }
1364                 ],
1365                 "description": "Sets JavaScript breakpoint at a given location specified by URL. This breakpoint will survive page reload."
1366             },
1367             {
1368                 "name": "setBreakpoint",
1369                 "parameters": [
1370                     { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
1371                     { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
1372                 ],
1373                 "returns": [
1374                     { "name": "breakpointId", "type": "string", "description": "Id of the created breakpoint for further manipulations." },
1375                     { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
1376                 ],
1377                 "description": "Sets JavaScript breakpoint at a given location."
1378             },
1379             {
1380                 "name": "removeBreakpoint",
1381                 "parameters": [
1382                     { "name": "breakpointId", "type": "string" }
1383                 ],
1384                 "description": "Removes JavaScript breakpoint."
1385             },
1386             {
1387                 "name": "continueToLocation",
1388                 "parameters": [
1389                     { "name": "location", "$ref": "Location", "description": "Location to continue to." }
1390                 ],
1391                 "description": "Continues execution until specific location is reached."
1392             },
1393             {
1394                 "name": "stepOver",
1395                 "description": "Steps over the statement."
1396             },
1397             {
1398                 "name": "stepInto",
1399                 "description": "Steps into the statement."
1400             },
1401             {
1402                 "name": "stepOut",
1403                 "description": "Steps out of the function."
1404             },
1405             {
1406                 "name": "pause",
1407                 "description": "Stops on the next JavaScript statement."
1408             },
1409             {
1410                 "name": "resume",
1411                 "description": "Resumes JavaScript execution."
1412             },
1413             {
1414                 "name": "editScriptSource",
1415                 "parameters": [
1416                     { "name": "sourceID", "type": "string", "description": "Id of the script to edit." },
1417                     { "name": "scriptSource", "type": "string", "description": "New content of the script." }
1418                 ],
1419                 "returns": [
1420                     { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." }
1421                 ],
1422                 "description": "Edits JavaScript script live."
1423             },
1424             {
1425                 "name": "getScriptSource",
1426                 "parameters": [
1427                     { "name": "sourceID", "type": "string", "description": "Id of the script to get source for." }
1428                 ],
1429                 "returns": [
1430                     { "name": "scriptSource", "type": "string", "description": "Script source." }
1431                 ],
1432                 "description": "Returns source for the script with given ID."
1433             },
1434             {
1435                 "name": "setPauseOnExceptions",
1436                 "parameters": [
1437                     { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
1438                 ],
1439                 "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions."
1440             },
1441             {
1442                 "name": "evaluateOnCallFrame",
1443                 "parameters": [
1444                     { "name": "callFrameId", "type": "string", "description": "Call frame identifier to evaluate on. This identifier is a part of backtrace reported by the <code>pausedScript</code>." },
1445                     { "name": "expression", "type": "string", "description": "Expression to evaluate." },
1446                     { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
1447                     { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." }
1448                 ],
1449                 "returns": [
1450                     { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }
1451                 ],
1452                 "description": "Evaluates expression on a given call frame."
1453             }
1454         ],
1455         "events": [
1456             {
1457                 "name": "debuggerWasEnabled",
1458                 "description": "Fired when debugger gets enabled (deprecated)."
1459             },
1460             {
1461                 "name": "debuggerWasDisabled",
1462                 "description": "Fired when debugger gets disabled (deprecated)."
1463             },
1464             {
1465                 "name": "scriptParsed",
1466                 "parameters": [
1467                     { "name": "sourceID", "type": "string", "description": "Identifier of the script parsed." },
1468                     { "name": "url", "type": "string", "description": "URL of the script parsed (if any)." },
1469                     { "name": "lineOffset", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
1470                     { "name": "columnOffset", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
1471                     { "name": "length", "type": "integer", "description": "Length of the script" },
1472                     { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }
1473                 ],
1474                 "description": "Fired when virtual machine parses script. This even is also fired for all known scripts upon enabling debugger."
1475             },
1476             {
1477                 "name": "scriptFailedToParse",
1478                 "parameters": [
1479                     { "name": "url", "type": "string", "description": "URL of the script that failed to parse." },
1480                     { "name": "data", "type": "string", "description": "Source text of the script that failed to parse." },
1481                     { "name": "firstLine", "type": "integer", "description": "Line offset of the script within the resource." },
1482                     { "name": "errorLine", "type": "integer", "description": "Line with error." },
1483                     { "name": "errorMessage", "type": "string", "description": "Parse error message." }
1484                 ],
1485                 "description": "Fired when virtual machine fails to parse the script."
1486             },
1487             {
1488                 "name": "breakpointResolved",
1489                 "parameters": [
1490                     { "name": "breakpointId", "type": "string", "description": "Breakpoint unique identifier." },
1491                     { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
1492                 ],
1493                 "description": "Fired when breakpoint is resolved to an actual script and location."
1494             },
1495             {
1496                 "name": "paused",
1497                 "parameters": [
1498                     { 
1499                         "name": "details",
1500                         "type": "object",
1501                         "properties": [
1502                             { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }
1503                         ],
1504                         "description": "Call stack information."
1505                     }
1506                 ],
1507                 "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
1508             },
1509             {
1510                 "name": "resumed",
1511                 "description": "Fired when the virtual machine resumed execution."
1512             }
1513         ]
1514     },
1515     {
1516         "domain": "BrowserDebugger",
1517         "description": "Browser 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.",
1518         "commands": [
1519             {
1520                 "name": "setDOMBreakpoint",
1521                 "parameters": [
1522                     { "name": "nodeId", "type": "integer", "description": "Identifier of the node to set breakpoint on." },
1523                     { "name": "type", "type": "integer", "description": "Type of the operation to stop upon." }
1524                 ],
1525                 "description": "Sets breakpoint on particular operation with DOM. "
1526             },
1527             {
1528                 "name": "removeDOMBreakpoint",
1529                 "parameters": [
1530                     { "name": "nodeId", "type": "integer", "description": "Identifier of the node to remove breakpoint from." },
1531                     { "name": "type", "type": "integer", "description": "Type of the breakpoint to remove." }
1532                 ],
1533                 "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>."
1534             },
1535             {
1536                 "name": "setEventListenerBreakpoint",
1537                 "parameters": [
1538                     { "name": "eventName", "type": "string", "description": "Event name to stop on (any DOM event will do)." }
1539                 ],
1540                 "description": "Sets breakpoint on particular DOM event."
1541             },
1542             {
1543                 "name": "removeEventListenerBreakpoint",
1544                 "parameters": [
1545                     { "name": "eventName", "type": "string", "description": "Event name." }
1546                 ],
1547                 "description": "Removes breakpoint on particular DOM event."
1548             },
1549             {
1550                 "name": "setXHRBreakpoint",
1551                 "parameters": [
1552                     { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." }
1553                 ],
1554                 "description": "Sets breakpoint on XMLHttpRequest."
1555             },
1556             {
1557                 "name": "removeXHRBreakpoint",
1558                 "parameters": [
1559                     { "name": "url", "type": "string", "description": "Resource URL substring." }
1560                 ],
1561                 "description": "Removes breakpoint from XMLHttpRequest."
1562             }
1563         ]
1564     },
1565     {
1566         "domain": "Profiler",
1567         "types": [],
1568         "commands": [
1569             {
1570                 "name": "enable"
1571             },
1572             {
1573                 "name": "disable"
1574             },
1575             {
1576                 "name": "isEnabled",
1577                 "returns": [
1578                     { "name": "state", "type": "boolean" }
1579                 ]
1580             },
1581             {
1582                 "name": "start"
1583             },
1584             {
1585                 "name": "stop"
1586             },
1587             {
1588                 "name": "getProfileHeaders",
1589                 "returns": [
1590                     { "name": "headers", "type": "array", "items": { "$ref": "ProfileHeader"} }
1591                 ]
1592             },
1593             {
1594                 "name": "getProfile",
1595                 "parameters": [
1596                     { "name": "type", "type": "string" },
1597                     { "name": "uid", "type": "integer" }
1598                 ],
1599                 "returns": [
1600                     { "name": "profile", "$ref": "Profile" }
1601                 ]
1602             },
1603             {
1604                 "name": "removeProfile",
1605                 "parameters": [
1606                     { "name": "type", "type": "string" },
1607                     { "name": "uid", "type": "integer" }
1608                 ]
1609             },
1610             {
1611                 "name": "clearProfiles"
1612             },
1613             {
1614                 "name": "takeHeapSnapshot",
1615                 "parameters": [
1616                     { "name": "detailed", "type": "boolean" }
1617                 ]
1618             },
1619             {
1620                 "name": "collectGarbage"
1621             }
1622         ],
1623         "events": [
1624             {
1625                 "name": "profilerWasEnabled"
1626             },
1627             {
1628                 "name": "profilerWasDisabled"
1629             },
1630             {
1631                 "name": "addProfileHeader",
1632                 "parameters": [
1633                     { "name": "header", "$ref": "ProfileHeader" }
1634                 ]
1635             },
1636             {
1637                 "name": "addHeapSnapshotChunk",
1638                 "parameters": [
1639                     { "name": "uid", "type": "integer" },
1640                     { "name": "chunk", "type": "string" }
1641                 ]
1642             },
1643             {
1644                 "name": "finishHeapSnapshot",
1645                 "parameters": [
1646                     { "name": "uid", "type": "integer" }
1647                 ]
1648             },
1649             {
1650                 "name": "setRecordingProfile",
1651                 "parameters": [
1652                     { "name": "isProfiling", "type": "boolean" }
1653                 ]
1654             },
1655             {
1656                 "name": "resetProfiles"
1657             },
1658             {
1659                 "name": "reportHeapSnapshotProgress",
1660                 "parameters": [
1661                     { "name": "done", "type": "integer" },
1662                     { "name": "total", "type": "integer" }
1663                 ]
1664             }
1665         ]
1666     },
1667     {
1668         "domain": "Worker",
1669         "types": [],
1670         "commands": [
1671             {
1672                 "name": "sendMessageToWorker",
1673                 "parameters": [
1674                     { "name": "workerId", "type": "integer" },
1675                     { "name": "message", "type": "object" }
1676                 ]
1677             }
1678         ],
1679         "events": [
1680             {
1681                 "name": "workerCreated",
1682                 "parameters": [
1683                     { "name": "workerId", "type": "integer" }
1684                 ]
1685             },
1686             {
1687                 "name": "dispatchMessageFromWorker",
1688                 "parameters": [
1689                     { "name": "workerId", "type": "integer" },
1690                     { "name": "message", "type": "object" }
1691                 ]
1692             }
1693         ]
1694     },
1695 ]