| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [ | 5 [ |
| 6 { | 6 { |
| 7 "namespace": "tabs", | 7 "namespace": "tabs", |
| 8 "description": "Use the <code>chrome.tabs</code> API to interact with the br
owser's tab system. You can use this API to create, modify, and rearrange tabs i
n the browser.", | 8 "description": "Use the <code>chrome.tabs</code> API to interact with the br
owser's tab system. You can use this API to create, modify, and rearrange tabs i
n the browser.", |
| 9 "types": [ | 9 "types": [ |
| 10 { | 10 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 "width": {"type": "integer", "optional": true, "description": "The wid
th of the tab in pixels."}, | 28 "width": {"type": "integer", "optional": true, "description": "The wid
th of the tab in pixels."}, |
| 29 "height": {"type": "integer", "optional": true, "description": "The he
ight of the tab in pixels."}, | 29 "height": {"type": "integer", "optional": true, "description": "The he
ight of the tab in pixels."}, |
| 30 "sessionId": {"type": "string", "optional": true, "description": "The
session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API
."} | 30 "sessionId": {"type": "string", "optional": true, "description": "The
session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API
."} |
| 31 } | 31 } |
| 32 }, | 32 }, |
| 33 { | 33 { |
| 34 "id": "InjectDetails", | 34 "id": "InjectDetails", |
| 35 "type": "object", | 35 "type": "object", |
| 36 "description": "Details of the script or CSS to inject. Either the code
or the file property must be set, but both may not be set at the same time.", | 36 "description": "Details of the script or CSS to inject. Either the code
or the file property must be set, but both may not be set at the same time.", |
| 37 "properties": { | 37 "properties": { |
| 38 "code": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS code to inject."}, | 38 "code": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS code to inject.<br><br><b>Warning:</b><br>Be careful using the <code>co
de</code> parameter. Incorrect use of it may open your extension to <a href=\"ht
tps://en.wikipedia.org/wiki/Cross-site_scripting\">cross site scripting</a> atta
cks."}, |
| 39 "file": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS file to inject."}, | 39 "file": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS file to inject."}, |
| 40 "allFrames": {"type": "boolean", "optional": true, "description": "If
allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj
ected into all frames of current page. By default, it's <code>false</code> and i
s only injected into the top frame."}, | 40 "allFrames": {"type": "boolean", "optional": true, "description": "If
allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj
ected into all frames of current page. By default, it's <code>false</code> and i
s only injected into the top frame."}, |
| 41 "runAt": { | 41 "runAt": { |
| 42 "type": "string", | 42 "type": "string", |
| 43 "optional": true, | 43 "optional": true, |
| 44 "enum": ["document_start", "document_end", "document_idle"], | 44 "enum": ["document_start", "document_end", "document_idle"], |
| 45 "description": "The soonest that the JavaScript or CSS will be injec
ted into the tab. Defaults to \"document_idle\"." | 45 "description": "The soonest that the JavaScript or CSS will be injec
ted into the tab. Defaults to \"document_idle\"." |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 } | 48 } |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 "type": "function", | 917 "type": "function", |
| 918 "description": "Fired when a tab is replaced with another tab due to pre
rendering or instant.", | 918 "description": "Fired when a tab is replaced with another tab due to pre
rendering or instant.", |
| 919 "parameters": [ | 919 "parameters": [ |
| 920 {"type": "integer", "name": "addedTabId", "minimum": 0}, | 920 {"type": "integer", "name": "addedTabId", "minimum": 0}, |
| 921 {"type": "integer", "name": "removedTabId", "minimum": 0} | 921 {"type": "integer", "name": "removedTabId", "minimum": 0} |
| 922 ] | 922 ] |
| 923 } | 923 } |
| 924 ] | 924 ] |
| 925 } | 925 } |
| 926 ] | 926 ] |
| OLD | NEW |