OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "namespace": "experimental.devtools.inspectedWindow", | 3 "namespace": "experimental.devtools.inspectedWindow", |
| 4 "types": [ |
| 5 { |
| 6 "id": "Resource", |
| 7 "type": "object", |
| 8 "description": "A resource within the inspected page, such as a document
, a script or an image.", |
| 9 "properties": { |
| 10 "url": { |
| 11 "type": "string", |
| 12 "description": "The URL of the resource." |
| 13 } |
| 14 }, |
| 15 "functions": [ |
| 16 { |
| 17 "name": "getContent", |
| 18 "type": "function", |
| 19 "description": "Gets the content of the resource.", |
| 20 "parameters": [ |
| 21 { |
| 22 "name": "callback", |
| 23 "type": "function", |
| 24 "description": "A function that is called upon request completio
n.", |
| 25 "parameters": [ |
| 26 { |
| 27 "name": "content", |
| 28 "type": "string", |
| 29 "description": "Content of the resource (potentially encoded
)." |
| 30 }, |
| 31 { |
| 32 "name": "encoding", |
| 33 "type": "string", |
| 34 "description": "Empty if content is not encoded, encoding na
me otherwise. Currently, only base64 is supported." |
| 35 } |
| 36 ] |
| 37 } |
| 38 ] |
| 39 }, |
| 40 { |
| 41 "name": "setContent", |
| 42 "type": "function", |
| 43 "description": "Sets the content of the resource.", |
| 44 "parameters": [ |
| 45 { |
| 46 "name": "content", |
| 47 "type": "string", |
| 48 "description": "New content of the resource. Only resources with
the text type are currently supported." |
| 49 }, |
| 50 { |
| 51 "name": "commit", |
| 52 "type": "boolean", |
| 53 "description": "True if the user has finished editing the resour
ce and the new content of the resource should be persisted, false if this is a m
inor change sent in progress of the user editing the resource." |
| 54 }, |
| 55 { |
| 56 "name": "callback", |
| 57 "type": "function", |
| 58 "description": "A function called upon request completion.", |
| 59 "parameters": [ |
| 60 { |
| 61 "name": "error", |
| 62 "type": "object", |
| 63 "optional": true, |
| 64 "description": "Set to undefined if the operation completed
successfully, describes error otherwise." |
| 65 } |
| 66 ] |
| 67 } |
| 68 ] |
| 69 } |
| 70 ] |
| 71 } |
| 72 ], |
4 "properties": { | 73 "properties": { |
5 "tabId": { | 74 "tabId": { |
6 "description": "The ID of the tab being inspected. This ID may be used w
ith chrome.tabs.* API.", | 75 "description": "The ID of the tab being inspected. This ID may be used w
ith chrome.tabs.* API.", |
7 "type": "integer" | 76 "type": "integer" |
8 } | 77 } |
9 }, | 78 }, |
10 "functions": [ | 79 "functions": [ |
11 { | 80 { |
12 "name": "eval", | 81 "name": "eval", |
13 "type": "function", | 82 "type": "function", |
(...skipping 28 matching lines...) Expand all Loading... |
42 "type": "function", | 111 "type": "function", |
43 "description": "Reloads the inspected page, optionally setting override
for the user agent string.", | 112 "description": "Reloads the inspected page, optionally setting override
for the user agent string.", |
44 "parameters": [ | 113 "parameters": [ |
45 { | 114 { |
46 "name": "userAgent", | 115 "name": "userAgent", |
47 "type": "string", | 116 "type": "string", |
48 "optional": true, | 117 "optional": true, |
49 "description": "A user agent override string." | 118 "description": "A user agent override string." |
50 } | 119 } |
51 ] | 120 ] |
| 121 }, |
| 122 { |
| 123 "name": "getResources", |
| 124 "type": "function", |
| 125 "description": "Retrieves the list of resources from the inspected page.
", |
| 126 "parameters": [ |
| 127 { |
| 128 "name": "callback", |
| 129 "type": "function", |
| 130 "description": "A function that is called upon request completion.", |
| 131 "parameters": [ |
| 132 { |
| 133 "name": "resources", |
| 134 "type": "array", |
| 135 "items": { "$ref": "Resource" }, |
| 136 "description": "The resources within the page." |
| 137 } |
| 138 ] |
| 139 } |
| 140 ] |
| 141 } |
| 142 ], |
| 143 "events": [ |
| 144 { |
| 145 "name": "onResourceAdded", |
| 146 "description": "Fired when a new resource is added to the inspected page
.", |
| 147 "parameters": [ |
| 148 { |
| 149 "name": "resource", |
| 150 "$ref": "Resource" |
| 151 } |
| 152 ] |
| 153 }, |
| 154 { |
| 155 "name": "onResourceContentCommitted", |
| 156 "description": "Fired when a new revision of the resource is committed (
e.g. user saves an edited version of the resource in the Developer Tools).", |
| 157 "parameters": [ |
| 158 { |
| 159 "name": "resource", |
| 160 "$ref": "Resource" |
| 161 } |
| 162 ] |
52 } | 163 } |
53 ] | 164 ] |
54 }, | 165 }, |
55 { | 166 { |
56 "namespace": "experimental.devtools.panels", | 167 "namespace": "experimental.devtools.panels", |
57 "types": [ | 168 "types": [ |
58 { | 169 { |
59 "id": "PanelWithSidebars", | 170 "id": "PanelWithSidebars", |
60 "type": "object", | 171 "type": "object", |
61 "isInstanceOf": "Panel", | 172 "isInstanceOf": "Panel", |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 "description": "A function that is called upon request completio
n.", | 365 "description": "A function that is called upon request completio
n.", |
255 "parameters": [ | 366 "parameters": [ |
256 { | 367 { |
257 "name": "content", | 368 "name": "content", |
258 "type": "string", | 369 "type": "string", |
259 "description": "Content of the response body (potentially en
coded)." | 370 "description": "Content of the response body (potentially en
coded)." |
260 }, | 371 }, |
261 { | 372 { |
262 "name": "encoding", | 373 "name": "encoding", |
263 "type": "string", | 374 "type": "string", |
264 "description": "Empty if content is not encoded, encoding na
me otherwise. Currently, only base64 supported." | 375 "description": "Empty if content is not encoded, encoding na
me otherwise. Currently, only base64 is supported." |
265 } | 376 } |
266 ] | 377 ] |
267 } | 378 } |
268 ] | 379 ] |
269 } | 380 } |
270 ] | 381 ] |
271 } | 382 } |
272 ], | 383 ], |
273 "functions": [ | 384 "functions": [ |
274 { | 385 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 { | 419 { |
309 "name": "url", | 420 "name": "url", |
310 "type": "string", | 421 "type": "string", |
311 "description": "URL of the new page." | 422 "description": "URL of the new page." |
312 } | 423 } |
313 ] | 424 ] |
314 } | 425 } |
315 ] | 426 ] |
316 }, | 427 }, |
317 { | 428 { |
| 429 "namespace": "experimental.devtools.console", |
| 430 "functions": [ |
| 431 { |
| 432 "name": "addMessage", |
| 433 "type": "function", |
| 434 "description": "Adds a message to the console.", |
| 435 "parameters": [ |
| 436 { "name": "severity", "$ref": "Severity", "description": "The severity
of the message." }, |
| 437 { "name": "text", "type": "string", "description": "The text of the me
ssage." } |
| 438 ] |
| 439 }, |
| 440 { |
| 441 "name": "getMessages", |
| 442 "type": "function", |
| 443 "description": "Retrieves console messages.", |
| 444 "parameters": [ |
| 445 { |
| 446 "name": "callback", |
| 447 "type": "function", |
| 448 "description": "A function that is called upon request completion.", |
| 449 "parameters": [ |
| 450 { |
| 451 "name": "messages", |
| 452 "type": "array", |
| 453 "items": { "$ref": "ConsoleMessage" }, |
| 454 "description": "Console messages." |
| 455 } |
| 456 ] |
| 457 } |
| 458 ] |
| 459 } |
| 460 ], |
| 461 "types": [ |
| 462 { |
| 463 "id": "ConsoleMessage", |
| 464 "type": "object", |
| 465 "description": "A console message.", |
| 466 "properties": { |
| 467 "severity": { |
| 468 "$ref": "Severity", |
| 469 "description": "Message severity." |
| 470 }, |
| 471 "text": { |
| 472 "type": "string", |
| 473 "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)." |
| 474 }, |
| 475 "url": { |
| 476 "type": "string", |
| 477 "optional": true, |
| 478 "description": "The URL of the script that originated the message, i
f available." |
| 479 }, |
| 480 "line": { |
| 481 "type": "number", |
| 482 "optional": true, |
| 483 "description": "The number of the line where the message originated,
if available." |
| 484 } |
| 485 } |
| 486 }, |
| 487 { |
| 488 "id": "Severity", |
| 489 "type": "object", |
| 490 "properties": { |
| 491 "Tip": { |
| 492 "type": "string" |
| 493 }, |
| 494 "Debug": { |
| 495 "type": "string" |
| 496 }, |
| 497 "Log": { |
| 498 "type": "string" |
| 499 }, |
| 500 "Warning": { |
| 501 "type": "string" |
| 502 }, |
| 503 "Error": { |
| 504 "type": "string" |
| 505 } |
| 506 } |
| 507 } |
| 508 ], |
| 509 "events": [ |
| 510 { |
| 511 "name": "onMessageAdded", |
| 512 "type": "function", |
| 513 "description": "Fired when a new message is added to the console.", |
| 514 "parameters": [ |
| 515 { "name": "message", "$ref": "ConsoleMessage" } |
| 516 ] |
| 517 } |
| 518 ] |
| 519 }, |
| 520 { |
318 "namespace": "experimental.devtools.audits", | 521 "namespace": "experimental.devtools.audits", |
319 "functions": [ | 522 "functions": [ |
320 { | 523 { |
321 "name": "addCategory", | 524 "name": "addCategory", |
322 "type": "function", | 525 "type": "function", |
323 "description": "Adds an audit category.", | 526 "description": "Adds an audit category.", |
324 "parameters": [ | 527 "parameters": [ |
325 { "name": "displayName", "type": "string", "description": "A display n
ame for the category." }, | 528 { "name": "displayName", "type": "string", "description": "A display n
ame for the category." }, |
326 { "name": "resultCount", "type": "number", "description": "The expecte
d number of audit results in the category." } | 529 { "name": "resultCount", "type": "number", "description": "The expecte
d number of audit results in the category." } |
327 ], | 530 ], |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 "type": "string" | 691 "type": "string" |
489 }, | 692 }, |
490 "Severe": { | 693 "Severe": { |
491 "type": "string" | 694 "type": "string" |
492 } | 695 } |
493 } | 696 } |
494 } | 697 } |
495 ] | 698 ] |
496 } | 699 } |
497 ] | 700 ] |
OLD | NEW |