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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
569 "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.", | 569 "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.", |
570 "parameters": [ | 570 "parameters": [ |
571 {"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."}, | 571 {"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."}, |
572 { | 572 { |
573 "type": "object", | 573 "type": "object", |
574 "name": "details", | 574 "name": "details", |
575 "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.", | 575 "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.", |
576 "properties": { | 576 "properties": { |
577 "code": {"type": "string", "optional": true, "description": "JavaS cript code to execute."}, | 577 "code": {"type": "string", "optional": true, "description": "JavaS cript code to execute."}, |
578 "file": {"type": "string", "optional": true, "description": "JavaS cript file to execute."}, | 578 "file": {"type": "string", "optional": true, "description": "JavaS cript file to execute."}, |
579 "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. "} | 579 "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. "}, |
580 "runAt": { | |
581 "type": "string", | |
582 "optional": true, | |
583 "enum": ["document_start", "document_end", "document_idle"], | |
584 "descrption": "The soonest that the script will be injected into the tab. Defaults to \"document_idle\"." | |
585 } | |
580 } | 586 } |
581 }, | 587 }, |
582 { | 588 { |
583 "type": "function", | 589 "type": "function", |
584 "name": "callback", | 590 "name": "callback", |
585 "optional": true, | 591 "optional": true, |
586 "description": "Called after all the JavaScript has been executed.", | 592 "description": "Called after all the JavaScript has been executed.", |
587 "parameters": [] | 593 "parameters": [] |
588 } | 594 } |
589 ] | 595 ] |
590 }, | 596 }, |
591 { | 597 { |
592 "name": "insertCSS", | 598 "name": "insertCSS", |
593 "type": "function", | 599 "type": "function", |
594 "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.", | 600 "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.", |
595 "parameters": [ | 601 "parameters": [ |
596 {"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."}, | 602 {"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."}, |
597 { | 603 { |
598 "type": "object", | 604 "type": "object", |
599 "name": "details", | 605 "name": "details", |
600 "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.", | 606 "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.", |
601 "properties": { | 607 "properties": { |
602 "code": {"type": "string", "optional": true, "description": "CSS c ode to be injected."}, | 608 "code": {"type": "string", "optional": true, "description": "CSS c ode to be injected."}, |
603 "file": {"type": "string", "optional": true, "description": "CSS f ile to be injected."}, | 609 "file": {"type": "string", "optional": true, "description": "CSS f ile to be injected."}, |
604 "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." } | 610 "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." }, |
611 "runAt": { | |
612 "type": "string", | |
613 "optional": true, | |
614 "enum": ["document_start", "document_end", "document_idle"], | |
615 "descrption": "The soonest that the CSS will be injected into th e tab. Defaults to \"document_idle\"." | |
Aaron Boodman
2012/03/28 01:04:16
I think CSS is always injected immediately, so thi
eaugusti
2012/03/28 17:40:19
I took a closer look, and CSS is not injected imme
Aaron Boodman
2012/03/30 21:47:04
That is weird, but OK.
| |
616 } | |
605 } | 617 } |
606 }, | 618 }, |
607 { | 619 { |
608 "type": "function", | 620 "type": "function", |
609 "name": "callback", | 621 "name": "callback", |
610 "optional": true, | 622 "optional": true, |
611 "description": "Called when all the CSS has been inserted.", | 623 "description": "Called when all the CSS has been inserted.", |
612 "parameters": [] | 624 "parameters": [] |
613 } | 625 } |
614 ] | 626 ] |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
844 "name": "removeInfo", | 856 "name": "removeInfo", |
845 "properties": { | 857 "properties": { |
846 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." } | 858 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." } |
847 } | 859 } |
848 } | 860 } |
849 ] | 861 ] |
850 } | 862 } |
851 ] | 863 ] |
852 } | 864 } |
853 ] | 865 ] |
OLD | NEW |