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 "nocompile": true, |
| 9 "functions": [ |
| 10 { |
| 11 "name": "addMessage", |
| 12 "type": "function", |
| 13 "description": "Adds a message to the console.", |
| 14 "parameters": [ |
| 15 { "name": "severity", "$ref": "Severity", "description": "The severity
of the message." }, |
| 16 { "name": "text", "type": "string", "description": "The text of the me
ssage." } |
| 17 ] |
| 18 }, |
| 19 { |
| 20 "name": "getMessages", |
| 21 "type": "function", |
| 22 "description": "Retrieves console messages.", |
| 23 "parameters": [ |
| 24 { |
| 25 "name": "callback", |
| 26 "type": "function", |
| 27 "description": "A function that receives console messages when the r
equest completes.", |
| 28 "parameters": [ |
| 29 { |
| 30 "name": "messages", |
| 31 "type": "array", |
| 32 "items": { "$ref": "ConsoleMessage" }, |
| 33 "description": "Console messages." |
| 34 } |
| 35 ] |
| 36 } |
| 37 ] |
| 38 } |
| 39 ], |
| 40 "types": [ |
| 41 { |
| 42 "id": "ConsoleMessage", |
| 43 "type": "object", |
| 44 "description": "A console message.", |
| 45 "properties": { |
| 46 "severity": { |
| 47 "$ref": "Severity", |
| 48 "description": "Message severity." |
| 49 }, |
| 50 "text": { |
| 51 "type": "string", |
| 52 "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)." |
| 53 }, |
| 54 "url": { |
| 55 "type": "string", |
| 56 "optional": true, |
| 57 "description": "The URL of the script that originated the message, i
f available." |
| 58 }, |
| 59 "line": { |
| 60 "type": "number", |
| 61 "optional": true, |
| 62 "description": "The number of the line where the message originated,
if available." |
| 63 } |
| 64 } |
| 65 }, |
| 66 { |
| 67 "id": "Severity", |
| 68 "type": "object", |
| 69 "properties": { |
| 70 "Tip": { |
| 71 "type": "string" |
| 72 }, |
| 73 "Debug": { |
| 74 "type": "string" |
| 75 }, |
| 76 "Log": { |
| 77 "type": "string" |
| 78 }, |
| 79 "Warning": { |
| 80 "type": "string" |
| 81 }, |
| 82 "Error": { |
| 83 "type": "string" |
| 84 } |
| 85 } |
| 86 } |
| 87 ], |
| 88 "events": [ |
| 89 { |
| 90 "name": "onMessageAdded", |
| 91 "type": "function", |
| 92 "description": "Fired when a new message is added to the console.", |
| 93 "parameters": [ |
| 94 { "name": "message", "$ref": "ConsoleMessage" } |
| 95 ] |
| 96 } |
| 97 ] |
| 98 } |
| 99 ] |
OLD | NEW |