Index: chrome/common/extensions/api/devtools/experimental_console.json |
diff --git a/chrome/common/extensions/api/devtools/experimental_console.json b/chrome/common/extensions/api/devtools/experimental_console.json |
new file mode 100644 |
index 0000000000000000000000000000000000000000..35ea7f0db5e9358c83ed275dfe18f944a5186ec9 |
--- /dev/null |
+++ b/chrome/common/extensions/api/devtools/experimental_console.json |
@@ -0,0 +1,99 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+[ |
+ { |
+ "namespace": "experimental.devtools.console", |
+ "nocompile": true, |
+ "functions": [ |
+ { |
+ "name": "addMessage", |
+ "type": "function", |
+ "description": "Adds a message to the console.", |
+ "parameters": [ |
+ { "name": "severity", "$ref": "Severity", "description": "The severity of the message." }, |
+ { "name": "text", "type": "string", "description": "The text of the message." } |
+ ] |
+ }, |
+ { |
+ "name": "getMessages", |
+ "type": "function", |
+ "description": "Retrieves console messages.", |
+ "parameters": [ |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "description": "A function that receives console messages when the request completes.", |
+ "parameters": [ |
+ { |
+ "name": "messages", |
+ "type": "array", |
+ "items": { "$ref": "ConsoleMessage" }, |
+ "description": "Console messages." |
+ } |
+ ] |
+ } |
+ ] |
+ } |
+ ], |
+ "types": [ |
+ { |
+ "id": "ConsoleMessage", |
+ "type": "object", |
+ "description": "A console message.", |
+ "properties": { |
+ "severity": { |
+ "$ref": "Severity", |
+ "description": "Message severity." |
+ }, |
+ "text": { |
+ "type": "string", |
+ "description": "The text of the console message, as represented by the first argument to the console.log() or a similar method (no parameter substitution performed)." |
+ }, |
+ "url": { |
+ "type": "string", |
+ "optional": true, |
+ "description": "The URL of the script that originated the message, if available." |
+ }, |
+ "line": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "The number of the line where the message originated, if available." |
+ } |
+ } |
+ }, |
+ { |
+ "id": "Severity", |
+ "type": "object", |
+ "properties": { |
+ "Tip": { |
+ "type": "string" |
+ }, |
+ "Debug": { |
+ "type": "string" |
+ }, |
+ "Log": { |
+ "type": "string" |
+ }, |
+ "Warning": { |
+ "type": "string" |
+ }, |
+ "Error": { |
+ "type": "string" |
+ } |
+ } |
+ } |
+ ], |
+ "events": [ |
+ { |
+ "name": "onMessageAdded", |
+ "type": "function", |
+ "description": "Fired when a new message is added to the console.", |
+ "parameters": [ |
+ { "name": "message", "$ref": "ConsoleMessage" } |
+ ] |
+ } |
+ ] |
+ } |
+] |