| OLD | NEW |
| 1 [ | 1 [ |
| 2 { | 2 { |
| 3 "namespace": "extension", | 3 "namespace": "extension", |
| 4 "unprivileged": true, |
| 4 "types": [ | 5 "types": [ |
| 5 { | 6 { |
| 6 "id": "MessageSender", | 7 "id": "MessageSender", |
| 7 "type": "object", | 8 "type": "object", |
| 8 "description": "An object containing information about the script contex
t that sent a message or request.", | 9 "description": "An object containing information about the script contex
t that sent a message or request.", |
| 9 "properties": { | 10 "properties": { |
| 10 "tab": {"$ref": "Tab", "optional": true, "description":"This property
will <b>only</b> be present when the connection was opened from a tab or content
script."}, | 11 "tab": {"$ref": "Tab", "optional": true, "description":"This property
will <b>only</b> be present when the connection was opened from a tab or content
script."}, |
| 11 "id": {"type": "string", "description": "The extension ID of the exten
sion that opened the connection."} | 12 "id": {"type": "string", "description": "The extension ID of the exten
sion that opened the connection."} |
| 12 } | 13 } |
| 13 }, | 14 }, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 35 "description": "Set for the lifetime of a callback if an ansychronous ex
tension api has resulted in an error. If no error has occured lastError will be
<var>undefined</var>.", | 36 "description": "Set for the lifetime of a callback if an ansychronous ex
tension api has resulted in an error. If no error has occured lastError will be
<var>undefined</var>.", |
| 36 "properties": { | 37 "properties": { |
| 37 "message": { "type": "string", "description": "Description of the erro
r that has taken place." } | 38 "message": { "type": "string", "description": "Description of the erro
r that has taken place." } |
| 38 } | 39 } |
| 39 } | 40 } |
| 40 }, | 41 }, |
| 41 "functions": [ | 42 "functions": [ |
| 42 { | 43 { |
| 43 "name": "connect", | 44 "name": "connect", |
| 44 "type": "function", | 45 "type": "function", |
| 46 "unprivileged": true, |
| 45 "description": "Attempts to connect to other listeners within the extens
ion (listeners may be toolstrips or the extension's background page). This is pr
imarily useful for content scripts connecting to their extension processes. Exte
nsions may connect to content scripts embedded in tabs via <a href='broken'><var
>chrome.tabs.connectToTab</var></a>.", | 47 "description": "Attempts to connect to other listeners within the extens
ion (listeners may be toolstrips or the extension's background page). This is pr
imarily useful for content scripts connecting to their extension processes. Exte
nsions may connect to content scripts embedded in tabs via <a href='broken'><var
>chrome.tabs.connectToTab</var></a>.", |
| 46 "parameters": [ | 48 "parameters": [ |
| 47 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, | 49 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, |
| 48 { | 50 { |
| 49 "type": "object", | 51 "type": "object", |
| 50 "name": "connectInfo", | 52 "name": "connectInfo", |
| 51 "properties": { | 53 "properties": { |
| 52 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for extension processes that are listening for the con
nection event." } | 54 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for extension processes that are listening for the con
nection event." } |
| 53 }, | 55 }, |
| 54 "optional": true | 56 "optional": true |
| 55 } | 57 } |
| 56 ], | 58 ], |
| 57 "returns": { | 59 "returns": { |
| 58 "$ref": "Port", | 60 "$ref": "Port", |
| 59 "description": "Port through which messages can be sent and received w
ith the extension." | 61 "description": "Port through which messages can be sent and received w
ith the extension." |
| 60 } | 62 } |
| 61 }, | 63 }, |
| 62 { | 64 { |
| 63 "name": "sendRequest", | 65 "name": "sendRequest", |
| 64 "type": "function", | 66 "type": "function", |
| 67 "unprivileged": true, |
| 65 "description": "Sends a single request to other listeners within the ext
ension. Similar to chrome.extension.connect, but only sends a single request wit
h an optional response.", | 68 "description": "Sends a single request to other listeners within the ext
ension. Similar to chrome.extension.connect, but only sends a single request wit
h an optional response.", |
| 66 "parameters": [ | 69 "parameters": [ |
| 67 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, | 70 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, |
| 68 { "type": "any", "name": "request" }, | 71 { "type": "any", "name": "request" }, |
| 69 { | 72 { |
| 70 "type": "function", | 73 "type": "function", |
| 71 "name": "responseCallback", | 74 "name": "responseCallback", |
| 72 "optional": true, | 75 "optional": true, |
| 73 "parameters": [ | 76 "parameters": [ |
| 74 { | 77 { |
| 75 "name": "response", | 78 "name": "response", |
| 76 "type": "any", | 79 "type": "any", |
| 77 "description": "The JSON response object sent by the handler of
the request." | 80 "description": "The JSON response object sent by the handler of
the request." |
| 78 } | 81 } |
| 79 ] | 82 ] |
| 80 } | 83 } |
| 81 ] | 84 ] |
| 82 }, | 85 }, |
| 83 { | 86 { |
| 84 "name": "getURL", | 87 "name": "getURL", |
| 85 "type": "function", | 88 "type": "function", |
| 89 "unprivileged": true, |
| 86 "description": "Convert a relative path within an extension install dire
ctory to a fully-qualified URL.", | 90 "description": "Convert a relative path within an extension install dire
ctory to a fully-qualified URL.", |
| 87 "parameters": [ | 91 "parameters": [ |
| 88 { | 92 { |
| 89 "type": "string", | 93 "type": "string", |
| 90 "name": "path", | 94 "name": "path", |
| 91 "description": "A path to a resource within an extension expressed r
elative to it's install directory." | 95 "description": "A path to a resource within an extension expressed r
elative to it's install directory." |
| 92 } | 96 } |
| 93 ], | 97 ], |
| 94 "returns": { | 98 "returns": { |
| 95 "type": "string", | 99 "type": "string", |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 "type": "array", | 144 "type": "array", |
| 141 "description": "Array of global objects", | 145 "description": "Array of global objects", |
| 142 "items": { "type": "object" } | 146 "items": { "type": "object" } |
| 143 } | 147 } |
| 144 } | 148 } |
| 145 ], | 149 ], |
| 146 "events": [ | 150 "events": [ |
| 147 { | 151 { |
| 148 "name": "onConnect", | 152 "name": "onConnect", |
| 149 "type": "function", | 153 "type": "function", |
| 154 "unprivileged": true, |
| 150 "description": "Fired when a connection is made from either an extension
process or a content script.", | 155 "description": "Fired when a connection is made from either an extension
process or a content script.", |
| 151 "parameters": [ | 156 "parameters": [ |
| 152 {"$ref": "Port", "name": "port"} | 157 {"$ref": "Port", "name": "port"} |
| 153 ] | 158 ] |
| 154 }, | 159 }, |
| 155 { | 160 { |
| 156 "name": "onConnectExternal", | 161 "name": "onConnectExternal", |
| 157 "type": "function", | 162 "type": "function", |
| 158 "description": "Fired when a connection is made from another extension."
, | 163 "description": "Fired when a connection is made from another extension."
, |
| 159 "parameters": [ | 164 "parameters": [ |
| 160 {"$ref": "Port", "name": "port"} | 165 {"$ref": "Port", "name": "port"} |
| 161 ] | 166 ] |
| 162 }, | 167 }, |
| 163 { | 168 { |
| 164 "name": "onRequest", | 169 "name": "onRequest", |
| 165 "type": "function", | 170 "type": "function", |
| 171 "unprivileged": true, |
| 166 "description": "Fired when a request is sent from either an extension pr
ocess or a content script.", | 172 "description": "Fired when a request is sent from either an extension pr
ocess or a content script.", |
| 167 "parameters": [ | 173 "parameters": [ |
| 168 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, | 174 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, |
| 169 {"name": "sender", "$ref": "MessageSender" }, | 175 {"name": "sender", "$ref": "MessageSender" }, |
| 170 {"name": "sendResponse", "type": "function", "description": "Function
to call when you have a response. The argument should be any JSON-ifiable object
, or undefined if there is no response." } | 176 {"name": "sendResponse", "type": "function", "description": "Function
to call when you have a response. The argument should be any JSON-ifiable object
, or undefined if there is no response." } |
| 171 ] | 177 ] |
| 172 }, | 178 }, |
| 173 { | 179 { |
| 174 "name": "onRequestExternal", | 180 "name": "onRequestExternal", |
| 175 "type": "function", | 181 "type": "function", |
| (...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1718 "type": "function", | 1724 "type": "function", |
| 1719 "description": "Logs a message during internal unit testing.", | 1725 "description": "Logs a message during internal unit testing.", |
| 1720 "parameters": [ | 1726 "parameters": [ |
| 1721 {"type": "string", "name": "message"} | 1727 {"type": "string", "name": "message"} |
| 1722 ] | 1728 ] |
| 1723 } | 1729 } |
| 1724 ], | 1730 ], |
| 1725 "events": [] | 1731 "events": [] |
| 1726 } | 1732 } |
| 1727 ] | 1733 ] |
| OLD | NEW |