| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [ | |
| 6 { | |
| 7 "namespace": "experimental.devtools.console", | |
| 8 "description": "Use the <code>chrome.experimental.devtools.console</code> AP
I to retrieve messages from the inspected page console and post messages there."
, | |
| 9 "nocompile": true, | |
| 10 "functions": [ | |
| 11 { | |
| 12 "name": "addMessage", | |
| 13 "type": "function", | |
| 14 "description": "Adds a message to the console.", | |
| 15 "parameters": [ | |
| 16 { "name": "severity", "$ref": "Severity", "description": "The severity
of the message." }, | |
| 17 { "name": "text", "type": "string", "description": "The text of the me
ssage." } | |
| 18 ] | |
| 19 }, | |
| 20 { | |
| 21 "name": "getMessages", | |
| 22 "type": "function", | |
| 23 "description": "Retrieves console messages.", | |
| 24 "parameters": [ | |
| 25 { | |
| 26 "name": "callback", | |
| 27 "type": "function", | |
| 28 "description": "A function that receives console messages when the r
equest completes.", | |
| 29 "parameters": [ | |
| 30 { | |
| 31 "name": "messages", | |
| 32 "type": "array", | |
| 33 "items": { "$ref": "ConsoleMessage" }, | |
| 34 "description": "Console messages." | |
| 35 } | |
| 36 ] | |
| 37 } | |
| 38 ] | |
| 39 } | |
| 40 ], | |
| 41 "types": [ | |
| 42 { | |
| 43 "id": "ConsoleMessage", | |
| 44 "type": "object", | |
| 45 "description": "A console message.", | |
| 46 "properties": { | |
| 47 "severity": { | |
| 48 "$ref": "Severity", | |
| 49 "description": "Message severity." | |
| 50 }, | |
| 51 "text": { | |
| 52 "type": "string", | |
| 53 "description": "The text of the console message, as represented by t
he first argument to the console.log() or a similar method (no parameter substit
ution performed)." | |
| 54 }, | |
| 55 "url": { | |
| 56 "type": "string", | |
| 57 "optional": true, | |
| 58 "description": "The URL of the script that originated the message, i
f available." | |
| 59 }, | |
| 60 "line": { | |
| 61 "type": "number", | |
| 62 "optional": true, | |
| 63 "description": "The number of the line where the message originated,
if available." | |
| 64 } | |
| 65 } | |
| 66 }, | |
| 67 { | |
| 68 "id": "Severity", | |
| 69 "type": "object", | |
| 70 "properties": { | |
| 71 "Tip": { | |
| 72 "type": "string" | |
| 73 }, | |
| 74 "Debug": { | |
| 75 "type": "string" | |
| 76 }, | |
| 77 "Log": { | |
| 78 "type": "string" | |
| 79 }, | |
| 80 "Warning": { | |
| 81 "type": "string" | |
| 82 }, | |
| 83 "Error": { | |
| 84 "type": "string" | |
| 85 } | |
| 86 } | |
| 87 } | |
| 88 ], | |
| 89 "events": [ | |
| 90 { | |
| 91 "name": "onMessageAdded", | |
| 92 "type": "function", | |
| 93 "description": "Fired when a new message is added to the console.", | |
| 94 "parameters": [ | |
| 95 { "name": "message", "$ref": "ConsoleMessage" } | |
| 96 ] | |
| 97 } | |
| 98 ] | |
| 99 } | |
| 100 ] | |
| OLD | NEW |