]> git.saurik.com Git - apple/javascriptcore.git/blame - inspector/protocol/Console.json
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / inspector / protocol / Console.json
CommitLineData
81345200
A
1{
2 "domain": "Console",
3 "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.",
4 "types": [
81345200
A
5 {
6 "id": "ConsoleMessage",
7 "type": "object",
8 "description": "Console message.",
9 "properties": [
ed1e77d3
A
10 { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "content-blocker", "other"], "description": "Message source." },
11 { "name": "level", "type": "string", "enum": ["log", "info", "warning", "error", "debug"], "description": "Message severity." },
81345200
A
12 { "name": "text", "type": "string", "description": "Message text." },
13 { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." },
14 { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
15 { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
16 { "name": "column", "type": "integer", "optional": true, "description": "Column number on the line in the resource that generated this message." },
17 { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
18 { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
19 { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
ed1e77d3 20 { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." }
81345200
A
21 ]
22 },
23 {
24 "id": "CallFrame",
25 "type": "object",
26 "description": "Stack entry for console errors and assertions.",
27 "properties": [
28 { "name": "functionName", "type": "string", "description": "JavaScript function name." },
29 { "name": "url", "type": "string", "description": "JavaScript script name or url." },
30 { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
31 { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
32 ]
33 },
34 {
35 "id": "StackTrace",
36 "type": "array",
37 "items": { "$ref": "CallFrame" },
38 "description": "Call frames for assertions or error messages."
39 }
40 ],
41 "commands": [
42 {
43 "name": "enable",
44 "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
45 },
46 {
47 "name": "disable",
48 "description": "Disables console domain, prevents further console messages from being reported to the client."
49 },
50 {
51 "name": "clearMessages",
52 "description": "Clears console messages collected in the browser."
53 },
54 {
55 "name": "setMonitoringXHREnabled",
56 "parameters": [
57 { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
58 ],
59 "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued."
60 },
61 {
62 "name": "addInspectedNode",
63 "parameters": [
ed1e77d3 64 { "name": "nodeId", "$ref": "DOM.NodeId", "description": "DOM node id to be accessible by means of $x command line API." }
81345200
A
65 ],
66 "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
67 }
68 ],
69 "events": [
70 {
71 "name": "messageAdded",
72 "parameters": [
73 { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
74 ],
75 "description": "Issued when new console message is added."
76 },
77 {
78 "name": "messageRepeatCountUpdated",
79 "parameters": [
80 { "name": "count", "type": "integer", "description": "New repeat count value." }
81 ],
82 "description": "Issued when subsequent message(s) are equal to the previous one(s)."
83 },
84 {
85 "name": "messagesCleared",
86 "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation."
87 }
88 ]
89}