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

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

Issue 173556: Implement script API:executeScript (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.json
===================================================================
--- chrome/common/extensions/api/extension_api.json (revision 26435)
+++ chrome/common/extensions/api/extension_api.json (working copy)
@@ -578,6 +578,64 @@
]
}
]
+ },
+ {
+ "name": "executeScript",
+ "type": "function",
+ "description": "",
+ "parameters": [
+ {"type": "integer", "name": "tabId", "optional": true, "description": "The id of tab which run the script, default to selected tab of current window."},
+ {
+ "type": "object",
+ "name": "scriptDef",
+ "description": "Note:scripts are injected in the following definition order.",
+ "properties": {
+ "code": {"type": "string", "optional": true, "description": "JavaScript code to execute."},
+ "file": {"type": "string", "optional": true, "description": "JavaScript file to execute."}
+ },
+ "optional": true
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "When all scripts are executed, this callback is called.",
+ "parameters": []
+ }
+ ],
+ "returns": {
+ "type": "boolean",
+ "description": "Whether this call is successful"
+ }
+ },
+ {
+ "name": "insertCSS",
+ "type": "function",
+ "description": "",
+ "parameters": [
+ {"type": "integer", "name": "tabId", "optional": true, "description": "The id of tab which run the script, default to selected tab of current window."},
+ {
+ "type": "object",
+ "name": "scriptDef",
+ "description": "Note:css are injected in the following definition order.",
+ "properties": {
+ "code": {"type": "string", "optional": true, "description": "CSS code to be injected."},
+ "file": {"type": "string", "optional": true, "description": "CSS file to be injected."},
+ },
+ "optional": true
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "When all css are inserted, this callback is called.",
+ "parameters": []
+ }
+ ],
+ "returns": {
+ "type": "boolean",
+ "description": "Whether this call is successful"
+ }
}
],
"events": [
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698