| OLD | NEW |
| 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"}, |
| 11 "onDisconnect": {"type": "object"}, | 11 "onDisconnect": {"type": "object"}, |
| 12 "onMessage": {"type": "object"}, | 12 "onMessage": {"type": "object"}, |
| 13 "postMessage": {"type": "function"}, | 13 "postMessage": {"type": "function"}, |
| 14 "tab": {"$ref": "Tab", "optional": true, "description":"This property
will <b>only</b> be present on ports passed to onConnect listeners when the conn
ection was opened from a tab or content script."} | 14 "sender": { |
| 15 "type": "object", |
| 16 "optional": true, |
| 17 "description": "This property will <b>only</b> be present on ports p
assed to onConnect/onConnectExternal listeners.", |
| 18 "properties": { |
| 19 "tab": {"$ref": "Tab", "optional": true, "description":"This prope
rty will <b>only</b> be present when the connection was opened from a tab or con
tent script."}, |
| 20 "id": {"type": "string", "description": "The extension ID of the e
xtension that opened the connection."} |
| 21 } |
| 22 } |
| 15 } | 23 } |
| 16 } | 24 } |
| 17 ], | 25 ], |
| 18 "properties": { | 26 "properties": { |
| 19 "lastError": { | 27 "lastError": { |
| 20 "type": "object", | 28 "type": "object", |
| 21 "optional": true, | 29 "optional": true, |
| 22 "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>.", | 30 "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>.", |
| 23 "properties": { | 31 "properties": { |
| 24 "message": { "type": "string", "description": "Description of the erro
r that has taken place." } | 32 "message": { "type": "string", "description": "Description of the erro
r that has taken place." } |
| 25 } | 33 } |
| 26 } | 34 } |
| 27 }, | 35 }, |
| 28 "functions": [ | 36 "functions": [ |
| 29 { | 37 { |
| 30 "name": "connect", | 38 "name": "connect", |
| 31 "type": "function", | 39 "type": "function", |
| 32 "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>.", | 40 "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>.", |
| 33 "parameters": [ | 41 "parameters": [ |
| 42 {"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."}, |
| 34 { | 43 { |
| 35 "type": "object", | 44 "type": "object", |
| 36 "name": "connectInfo", | 45 "name": "connectInfo", |
| 37 "properties": { | 46 "properties": { |
| 38 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for extension processes that are listening for the con
nection event." } | 47 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for extension processes that are listening for the con
nection event." } |
| 39 }, | 48 }, |
| 40 "optional": true | 49 "optional": true |
| 41 } | 50 } |
| 42 ], | 51 ], |
| 43 "returns": { | 52 "returns": { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 118 } |
| 110 ], | 119 ], |
| 111 "events": [ | 120 "events": [ |
| 112 { | 121 { |
| 113 "name": "onConnect", | 122 "name": "onConnect", |
| 114 "type": "function", | 123 "type": "function", |
| 115 "description": "Fired when a connection is made from either an extension
process or a content script.", | 124 "description": "Fired when a connection is made from either an extension
process or a content script.", |
| 116 "parameters": [ | 125 "parameters": [ |
| 117 {"$ref": "Port", "name": "port"} | 126 {"$ref": "Port", "name": "port"} |
| 118 ] | 127 ] |
| 128 }, |
| 129 { |
| 130 "name": "onConnectExternal", |
| 131 "type": "function", |
| 132 "description": "Fired when a connection is made from another extension."
, |
| 133 "parameters": [ |
| 134 {"$ref": "Port", "name": "port"} |
| 135 ] |
| 119 } | 136 } |
| 120 ] | 137 ] |
| 121 }, | 138 }, |
| 122 { | 139 { |
| 123 "namespace": "windows", | 140 "namespace": "windows", |
| 124 "types": [ | 141 "types": [ |
| 125 { | 142 { |
| 126 "id": "Window", | 143 "id": "Window", |
| 127 "type": "object", | 144 "type": "object", |
| 128 "properties": { | 145 "properties": { |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 "type": "function", | 1276 "type": "function", |
| 1260 "description": "Logs a message during internal unit testing.", | 1277 "description": "Logs a message during internal unit testing.", |
| 1261 "parameters": [ | 1278 "parameters": [ |
| 1262 {"type": "string", "name": "message"} | 1279 {"type": "string", "name": "message"} |
| 1263 ] | 1280 ] |
| 1264 } | 1281 } |
| 1265 ], | 1282 ], |
| 1266 "events": [] | 1283 "events": [] |
| 1267 } | 1284 } |
| 1268 ] | 1285 ] |
| OLD | NEW |