| Index: chrome/common/extensions/api/tabs.json
|
| diff --git a/chrome/common/extensions/api/tabs.json b/chrome/common/extensions/api/tabs.json
|
| index ccf137aef024ada0304f2e4e8785d0a7d4531227..537e11a61676c267cb27456e04b3dd8d3faf7b59 100644
|
| --- a/chrome/common/extensions/api/tabs.json
|
| +++ b/chrome/common/extensions/api/tabs.json
|
| @@ -25,6 +25,22 @@
|
| "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
|
| "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
|
| }
|
| + },
|
| + {
|
| + "id": "InjectDetails",
|
| + "type": "object",
|
| + "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.",
|
| + "properties": {
|
| + "code": {"type": "string", "optional": true, "description": "JavaScript or CSS code to inject."},
|
| + "file": {"type": "string", "optional": true, "description": "JavaScript or CSS file to inject."},
|
| + "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is <code>true</code>, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's <code>false</code> and will only be injected into the top frame."},
|
| + "runAt": {
|
| + "type": "string",
|
| + "optional": true,
|
| + "enum": ["document_start", "document_end", "document_idle"],
|
| + "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
|
| + }
|
| + }
|
| }
|
| ],
|
| "functions": [
|
| @@ -600,20 +616,9 @@
|
| "parameters": [
|
| {"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to run the script; defaults to the active tab of the current window."},
|
| {
|
| - "type": "object",
|
| + "$ref": "tabs.InjectDetails",
|
| "name": "details",
|
| - "description": "Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.",
|
| - "properties": {
|
| - "code": {"type": "string", "optional": true, "description": "JavaScript code to execute."},
|
| - "file": {"type": "string", "optional": true, "description": "JavaScript file to execute."},
|
| - "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects script into all frames of current page. By default, it's false and script is injected only into the top main frame."},
|
| - "runAt": {
|
| - "type": "string",
|
| - "optional": true,
|
| - "enum": ["document_start", "document_end", "document_idle"],
|
| - "description": "The soonest that the script will be injected into the tab. Defaults to \"document_idle\"."
|
| - }
|
| - }
|
| + "description": "Details of the script to run."
|
| },
|
| {
|
| "type": "function",
|
| @@ -639,20 +644,9 @@
|
| "parameters": [
|
| {"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to insert the CSS; defaults to the active tab of the current window."},
|
| {
|
| - "type": "object",
|
| + "$ref": "tabs.InjectDetails",
|
| "name": "details",
|
| - "description": "Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.",
|
| - "properties": {
|
| - "code": {"type": "string", "optional": true, "description": "CSS code to be injected."},
|
| - "file": {"type": "string", "optional": true, "description": "CSS file to be injected."},
|
| - "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects CSS text into all frames of current page. By default, it's false and CSS is injected only into the top main frame."},
|
| - "runAt": {
|
| - "type": "string",
|
| - "optional": true,
|
| - "enum": ["document_start", "document_end", "document_idle"],
|
| - "description": "The soonest that the CSS will be injected into the tab. Defaults to \"document_idle\"."
|
| - }
|
| - }
|
| + "description": "Details of the CSS text to insert."
|
| },
|
| {
|
| "type": "function",
|
|
|