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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "types": [ 4 "types": [
5 { 5 {
6 "id": "Port", 6 "id": "Port",
7 "type": "object", 7 "type": "object",
8 "description": "An object which allows two way communication with other pages.", 8 "description": "An object which allows two way communication with other pages.",
9 "properties": { 9 "properties": {
10 "name": {"type": "string"}, 10 "name": {"type": "string"},
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 "minimum": 0, 571 "minimum": 0,
572 "optional": true, 572 "optional": true,
573 "description": "The target window. Defaults to the <a href='windows. html#current-window'>current window</a>." 573 "description": "The target window. Defaults to the <a href='windows. html#current-window'>current window</a>."
574 }, 574 },
575 { 575 {
576 "type": "function", "name": "callback", "parameters": [ 576 "type": "function", "name": "callback", "parameters": [
577 {"type": "string", "name": "dataUrl", "description": "A data URL o f a JPEG encoding of the visible area of the captured tab. May be assigned to th e 'src' property of an HTML Image element for display."} 577 {"type": "string", "name": "dataUrl", "description": "A data URL o f a JPEG encoding of the visible area of the captured tab. May be assigned to th e 'src' property of an HTML Image element for display."}
578 ] 578 ]
579 } 579 }
580 ] 580 ]
581 },
582 {
583 "name": "executeScript",
584 "type": "function",
585 "description": "",
586 "parameters": [
587 {"type": "integer", "name": "tabId", "optional": true, "description": "The id of tab which run the script, default to selected tab of current window." },
588 {
589 "type": "object",
590 "name": "scriptDef",
591 "description": "Note:scripts are injected in the following definitio n order.",
592 "properties": {
593 "code": {"type": "string", "optional": true, "description": "JavaS cript code to execute."},
594 "file": {"type": "string", "optional": true, "description": "JavaS cript file to execute."}
595 },
596 "optional": true
597 },
598 {
599 "type": "function",
600 "name": "callback",
601 "optional": true,
602 "description": "When all scripts are executed, this callback is call ed.",
603 "parameters": []
604 }
605 ],
606 "returns": {
607 "type": "boolean",
608 "description": "Whether this call is successful"
609 }
610 },
611 {
612 "name": "insertCSS",
613 "type": "function",
614 "description": "",
615 "parameters": [
616 {"type": "integer", "name": "tabId", "optional": true, "description": "The id of tab which run the script, default to selected tab of current window." },
617 {
618 "type": "object",
619 "name": "scriptDef",
620 "description": "Note:css are injected in the following definition or der.",
621 "properties": {
622 "code": {"type": "string", "optional": true, "description": "CSS c ode to be injected."},
623 "file": {"type": "string", "optional": true, "description": "CSS f ile to be injected."},
624 },
625 "optional": true
626 },
627 {
628 "type": "function",
629 "name": "callback",
630 "optional": true,
631 "description": "When all css are inserted, this callback is called." ,
632 "parameters": []
633 }
634 ],
635 "returns": {
636 "type": "boolean",
637 "description": "Whether this call is successful"
638 }
581 } 639 }
582 ], 640 ],
583 "events": [ 641 "events": [
584 { 642 {
585 "name": "onCreated", 643 "name": "onCreated",
586 "type": "function", 644 "type": "function",
587 "description": "Fires when a tab is created.", 645 "description": "Fires when a tab is created.",
588 "parameters": [ 646 "parameters": [
589 { 647 {
590 "$ref": "Tab", 648 "$ref": "Tab",
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 "type": "function", 1168 "type": "function",
1111 "description": "Logs a message during internal unit testing.", 1169 "description": "Logs a message during internal unit testing.",
1112 "parameters": [ 1170 "parameters": [
1113 {"type": "string", "name": "message"} 1171 {"type": "string", "name": "message"}
1114 ] 1172 ]
1115 } 1173 }
1116 ], 1174 ],
1117 "events": [] 1175 "events": []
1118 } 1176 }
1119 ] 1177 ]
OLDNEW
« 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