Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: chrome/common/extensions/api/declarative_content.json

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add description to new Javascript events Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"
+ ]
+ }
}
]
}

Powered by Google App Engine
This is Rietveld 408576698