Chromium Code Reviews| Index: chrome/common/extensions/api/declarative_content.json |
| diff --git a/chrome/common/extensions/api/declarative_content.json b/chrome/common/extensions/api/declarative_content.json |
| index 7c383b58e2488cde704d5bc0a362beb348feebd4..507f3b71e0c95e98490a357b4298d0100bec8f1d 100644 |
| --- a/chrome/common/extensions/api/declarative_content.json |
| +++ b/chrome/common/extensions/api/declarative_content.json |
| @@ -48,6 +48,29 @@ |
| "nodoc": true |
| } |
| } |
| + }, |
| + { |
| + "id": "RequestContentScript", |
| + "description": "Declarative event action that injects a content script.", |
| + "type": "object", |
| + "properties": { |
| + "css": { |
| + "type": "array", |
| + "optional": true, |
| + "description": "Names of CSS files to be injected as a part of content script.", |
| + "items": { "type": "string" } |
| + }, |
| + "js": { |
| + "type": "array", |
| + "optional": true, |
| + "description": "Names of Javascript files to be injected as a part of content script.", |
| + "items": { "type": "string" } |
| + }, |
| + "instanceType": { |
| + "type": "string", "enum": ["declarativeContent.RequestContentScript"], |
| + "nodoc": true |
| + } |
| + } |
| } |
| ], |
| "functions": [ |
| @@ -63,6 +86,42 @@ |
| "declarativeContent.ShowPageAction" |
| ] |
| } |
| + }, |
| + { |
| + "name": "onDocumentStart", |
|
Jeffrey Yasskin
2014/06/27 22:03:41
I'm skeptical of adding three new events for this,
Mark Dittmer
2014/06/30 11:50:35
Ben and I discussed this and we both felt that the
|
| + "description": "Declarative event that fires just before the document object model is constructed.", |
| + "options": { |
| + "supportsListeners": false, |
| + "supportsRules": true, |
| + "conditions": ["declarativeContent.PageStateMatcher"], |
| + "actions": [ |
| + "declarativeContent.RequestContentScript" |
| + ] |
| + } |
| + }, |
| + { |
| + "name": "onDocumentEnd", |
| + "description": "Declarative event that fires just after the document object model is constructed.", |
| + "options": { |
| + "supportsListeners": false, |
| + "supportsRules": true, |
| + "conditions": ["declarativeContent.PageStateMatcher"], |
| + "actions": [ |
| + "declarativeContent.RequestContentScript" |
| + ] |
| + } |
| + }, |
| + { |
| + "name": "onDocumentIdle", |
| + "description": "Declarative event that fires sometime after the page has loaded. This event fires after onDocumentStart and onDocumentEnd, and is intended for performing actions that do not require precise timing.", |
| + "options": { |
| + "supportsListeners": false, |
| + "supportsRules": true, |
| + "conditions": ["declarativeContent.PageStateMatcher"], |
| + "actions": [ |
| + "declarativeContent.RequestContentScript" |
| + ] |
| + } |
| } |
| ] |
| } |