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 "dependencies": [ "extension", "windows" ], | 8 "dependencies": [ "extension", "windows" ], |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 "description": "Injects JavaScript code into a page. For details, see th
e <a href='content_scripts.html#pi'>programmatic injection</a> section of the co
ntent scripts doc.", | 598 "description": "Injects JavaScript code into a page. For details, see th
e <a href='content_scripts.html#pi'>programmatic injection</a> section of the co
ntent scripts doc.", |
599 "parameters": [ | 599 "parameters": [ |
600 {"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."}, | 600 {"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."}, |
601 { | 601 { |
602 "type": "object", | 602 "type": "object", |
603 "name": "details", | 603 "name": "details", |
604 "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.", | 604 "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.", |
605 "properties": { | 605 "properties": { |
606 "code": {"type": "string", "optional": true, "description": "JavaS
cript code to execute."}, | 606 "code": {"type": "string", "optional": true, "description": "JavaS
cript code to execute."}, |
607 "file": {"type": "string", "optional": true, "description": "JavaS
cript file to execute."}, | 607 "file": {"type": "string", "optional": true, "description": "JavaS
cript file to execute."}, |
608 "allFrames": {"type": "boolean", "optional": true, "description":
"If allFrames is true, this function injects script into all frames of current p
age. By default, it's false and script is injected only into the top main frame.
"} | 608 "allFrames": {"type": "boolean", "optional": true, "description":
"If allFrames is true, this function injects script into all frames of current p
age. By default, it's false and script is injected only into the top main frame.
"}, |
| 609 "runAt": { |
| 610 "type": "string", |
| 611 "optional": true, |
| 612 "enum": ["document_start", "document_end", "document_idle"], |
| 613 "description": "The soonest that the script will be injected int
o the tab. Defaults to \"document_idle\"." |
| 614 } |
609 } | 615 } |
610 }, | 616 }, |
611 { | 617 { |
612 "type": "function", | 618 "type": "function", |
613 "name": "callback", | 619 "name": "callback", |
614 "optional": true, | 620 "optional": true, |
615 "description": "Called after all the JavaScript has been executed.", | 621 "description": "Called after all the JavaScript has been executed.", |
616 "parameters": [] | 622 "parameters": [] |
617 } | 623 } |
618 ] | 624 ] |
619 }, | 625 }, |
620 { | 626 { |
621 "name": "insertCSS", | 627 "name": "insertCSS", |
622 "type": "function", | 628 "type": "function", |
623 "description": "Injects CSS into a page. For details, see the <a href='c
ontent_scripts.html#pi'>programmatic injection</a> section of the content script
s doc.", | 629 "description": "Injects CSS into a page. For details, see the <a href='c
ontent_scripts.html#pi'>programmatic injection</a> section of the content script
s doc.", |
624 "parameters": [ | 630 "parameters": [ |
625 {"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."}, | 631 {"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."}, |
626 { | 632 { |
627 "type": "object", | 633 "type": "object", |
628 "name": "details", | 634 "name": "details", |
629 "description": "Details of the CSS text to insert. Either the code o
r the file property must be set, but both may not be set at the same time.", | 635 "description": "Details of the CSS text to insert. Either the code o
r the file property must be set, but both may not be set at the same time.", |
630 "properties": { | 636 "properties": { |
631 "code": {"type": "string", "optional": true, "description": "CSS c
ode to be injected."}, | 637 "code": {"type": "string", "optional": true, "description": "CSS c
ode to be injected."}, |
632 "file": {"type": "string", "optional": true, "description": "CSS f
ile to be injected."}, | 638 "file": {"type": "string", "optional": true, "description": "CSS f
ile to be injected."}, |
633 "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."
} | 639 "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."
}, |
| 640 "runAt": { |
| 641 "type": "string", |
| 642 "optional": true, |
| 643 "enum": ["document_start", "document_end", "document_idle"], |
| 644 "description": "The soonest that the CSS will be injected into t
he tab. Defaults to \"document_idle\"." |
| 645 } |
634 } | 646 } |
635 }, | 647 }, |
636 { | 648 { |
637 "type": "function", | 649 "type": "function", |
638 "name": "callback", | 650 "name": "callback", |
639 "optional": true, | 651 "optional": true, |
640 "description": "Called when all the CSS has been inserted.", | 652 "description": "Called when all the CSS has been inserted.", |
641 "parameters": [] | 653 "parameters": [] |
642 } | 654 } |
643 ] | 655 ] |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 "name": "removeInfo", | 885 "name": "removeInfo", |
874 "properties": { | 886 "properties": { |
875 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } | 887 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } |
876 } | 888 } |
877 } | 889 } |
878 ] | 890 ] |
879 } | 891 } |
880 ] | 892 ] |
881 } | 893 } |
882 ] | 894 ] |
OLD | NEW |