OLD | NEW |
(Empty) | |
| 1 [ |
| 2 { |
| 3 "namespace": "tabs", |
| 4 "compile": true, |
| 5 "types": [ |
| 6 { |
| 7 "id": "Tab", |
| 8 "type": "object", |
| 9 "properties": { |
| 10 "id": {"type": "integer", "minimum": 0, "description": "The ID of the
tab. Tab IDs are unique within a browser session."}, |
| 11 "index": {"type": "integer", "minimum": 0, "description": "The zero-ba
sed index of the tab within its window."}, |
| 12 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o
f the window the tab is contained within."}, |
| 13 "selected": {"type": "boolean", "description": "Whether the tab is sel
ected.", "nodoc": true}, |
| 14 "highlighted": {"type": "boolean", "description": "Whether the tab is
highlighted."}, |
| 15 "active": {"type": "boolean", "description": "Whether the tab is activ
e in its window."}, |
| 16 "pinned": {"type": "boolean", "description": "Whether the tab is pinne
d."}, |
| 17 "url": {"type": "string", "description": "The URL the tab is displayin
g."}, |
| 18 "title": {"type": "string", "optional": true, "description": "The titl
e of the tab. This may not be available if the tab is loading."}, |
| 19 "favIconUrl": {"type": "string", "optional": true, "description": "The
URL of the tab's favicon. This may not be available if the tab is loading."}, |
| 20 "status": {"type": "string", "optional": true, "description": "Either
<em>loading</em> or <em>complete</em>."}, |
| 21 "incognito": {"type": "boolean", "description": "Whether the tab is in
an incognito window."} |
| 22 } |
| 23 } |
| 24 ], |
| 25 "functions": [ |
| 26 { |
| 27 "name": "get", |
| 28 "type": "function", |
| 29 "description": "Retrieves details about the specified tab.", |
| 30 "parameters": [ |
| 31 { |
| 32 "type": "integer", |
| 33 "name": "tabId", |
| 34 "minimum": 0 |
| 35 }, |
| 36 { |
| 37 "type": "function", |
| 38 "name": "callback", |
| 39 "parameters": [ |
| 40 {"name": "tab", "$ref": "Tab"} |
| 41 ] |
| 42 } |
| 43 ] |
| 44 }, |
| 45 { |
| 46 "name": "getCurrent", |
| 47 "type": "function", |
| 48 "description": "Gets the tab that this script call is being made from. M
ay be undefined if called from a non-tab context (for example: a background page
or popup view).", |
| 49 "parameters": [ |
| 50 { |
| 51 "type": "function", |
| 52 "name": "callback", |
| 53 "parameters": [ |
| 54 { |
| 55 "name": "tab", |
| 56 "$ref": "Tab", |
| 57 "optional": true |
| 58 } |
| 59 ] |
| 60 } |
| 61 ] |
| 62 }, |
| 63 { |
| 64 "name": "connect", |
| 65 "nocompile": true, |
| 66 "type": "function", |
| 67 "description": "Connects to the content script(s) in the specified tab.
The <a href='extension.html#event-onConnect'>chrome.extension.onConnect</a> even
t is fired in each content script running in the specified tab for the current e
xtension. For more details, see <a href='content_scripts.html#messaging'>Content
Script Messaging</a>.", |
| 68 "parameters": [ |
| 69 { |
| 70 "type": "integer", |
| 71 "name": "tabId", |
| 72 "minimum": 0 |
| 73 }, |
| 74 { |
| 75 "type": "object", |
| 76 "name": "connectInfo", |
| 77 "properties": { |
| 78 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for content scripts that are listening for the connect
ion event." } |
| 79 }, |
| 80 "optional": true |
| 81 } |
| 82 ], |
| 83 "returns": { |
| 84 "$ref": "Port", |
| 85 "description": "A port that can be used to communicate with the conten
t scripts running in the specified tab. The port's <a href='extension.html#type-
Port'>onDisconnect</a> event is fired if the tab closes or does not exist. " |
| 86 } |
| 87 }, |
| 88 { |
| 89 "name": "sendRequest", |
| 90 "nocompile": true, |
| 91 "type": "function", |
| 92 "description": "Sends a single request to the content script(s) in the s
pecified tab, with an optional callback to run when a response is sent back. Th
e <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event
is fired in each content script running in the specified tab for the current ext
ension.", |
| 93 "parameters": [ |
| 94 { |
| 95 "type": "integer", |
| 96 "name": "tabId", |
| 97 "minimum": 0 |
| 98 }, |
| 99 { |
| 100 "type": "any", |
| 101 "name": "request" |
| 102 }, |
| 103 { |
| 104 "type": "function", |
| 105 "name": "responseCallback", |
| 106 "optional": true, |
| 107 "parameters": [ |
| 108 { |
| 109 "name": "response", |
| 110 "type": "any", |
| 111 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the specified tab, the callb
ack will be called with no arguments and <a href='extension.html#property-lastEr
ror'>chrome.extension.lastError</a> will be set to the error message." |
| 112 } |
| 113 ] |
| 114 } |
| 115 ] |
| 116 }, |
| 117 { |
| 118 "name": "getSelected", |
| 119 "nodoc": true, |
| 120 "type": "function", |
| 121 "description": "Deprecated. Please use query({'active': true}). Gets the
tab that is selected in the specified window.", |
| 122 "parameters": [ |
| 123 { |
| 124 "type": "integer", |
| 125 "name": "windowId", |
| 126 "minimum": 0, |
| 127 "optional": true, |
| 128 "description": "Defaults to the <a href='windows.html#current-window
'>current window</a>." |
| 129 }, |
| 130 { |
| 131 "type": "function", |
| 132 "name": "callback", |
| 133 "parameters": [ |
| 134 {"name": "tab", "$ref": "Tab"} |
| 135 ] |
| 136 } |
| 137 ] |
| 138 }, |
| 139 { |
| 140 "name": "getAllInWindow", |
| 141 "type": "function", |
| 142 "nodoc": true, |
| 143 "description": "Deprecated. Please use query({'windowId': windowId}). Ge
ts details about all tabs in the specified window.", |
| 144 "parameters": [ |
| 145 { |
| 146 "type": "integer", |
| 147 "name": "windowId", |
| 148 "minimum": 0, |
| 149 "optional": true, |
| 150 "description": "Defaults to the <a href='windows.html#current-window
'>current window</a>." |
| 151 }, |
| 152 { |
| 153 "type": "function", |
| 154 "name": "callback", |
| 155 "parameters": [ |
| 156 {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } } |
| 157 ] |
| 158 } |
| 159 ] |
| 160 }, |
| 161 { |
| 162 "name": "create", |
| 163 "type": "function", |
| 164 "description": "Creates a new tab. Note: This function can be used witho
ut requesting the 'tabs' permission in the manifest.", |
| 165 "parameters": [ |
| 166 { |
| 167 "type": "object", |
| 168 "name": "createProperties", |
| 169 "properties": { |
| 170 "windowId": { |
| 171 "type": "integer", |
| 172 "minimum": 0, |
| 173 "optional": true, |
| 174 "description": "The window to create the new tab in. Defaults to
the <a href='windows.html#current-window'>current window</a>." |
| 175 }, |
| 176 "index": { |
| 177 "type": "integer", |
| 178 "minimum": 0, |
| 179 "optional": true, |
| 180 "description": "The position the tab should take in the window.
The provided value will be clamped to between zero and the number of tabs in the
window." |
| 181 }, |
| 182 "url": { |
| 183 "type": "string", |
| 184 "optional": true, |
| 185 "description": "The URL to navigate the tab to initially. Fully-
qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.goo
gle.com'). Relative URLs will be relative to the current page within the extensi
on. Defaults to the New Tab Page." |
| 186 }, |
| 187 "active": { |
| 188 "type": "boolean", |
| 189 "optional": true, |
| 190 "description": "Whether the tab should become the active tab in
the window. Defaults to <var>true</var>" |
| 191 }, |
| 192 "selected": { |
| 193 "nodoc": true, |
| 194 "type": "boolean", |
| 195 "optional": true, |
| 196 "description": "Whether the tab should become the selected tab i
n the window. Defaults to <var>true</var>" |
| 197 }, |
| 198 "pinned": { |
| 199 "type": "boolean", |
| 200 "optional": true, |
| 201 "description": "Whether the tab should be pinned. Defaults to <v
ar>false</var>" |
| 202 } |
| 203 } |
| 204 }, |
| 205 { |
| 206 "type": "function", |
| 207 "name": "callback", |
| 208 "optional": true, |
| 209 "parameters": [ |
| 210 { |
| 211 "name": "tab", |
| 212 "$ref": "Tab", |
| 213 "description": "Details about the created tab. Will contain the
ID of the new tab." |
| 214 } |
| 215 ] |
| 216 } |
| 217 ] |
| 218 }, |
| 219 { |
| 220 "name": "query", |
| 221 "type": "function", |
| 222 "description": "Gets all tabs that have the specified properties, or all
tabs if no properties are specified.", |
| 223 "parameters": [ |
| 224 { |
| 225 "type": "object", |
| 226 "name": "queryInfo", |
| 227 "properties": { |
| 228 "active": { |
| 229 "type": "boolean", |
| 230 "optional": true, |
| 231 "description": "Whether the tabs are active in their windows." |
| 232 }, |
| 233 "pinned": { |
| 234 "type": "boolean", |
| 235 "optional": true, |
| 236 "description": "Whether the tabs are pinned." |
| 237 }, |
| 238 "highlighted": { |
| 239 "type": "boolean", |
| 240 "optional": true, |
| 241 "description": "Whether the tabs are highlighted." |
| 242 }, |
| 243 "status": { |
| 244 "type": "string", |
| 245 "optional": true, |
| 246 "enum": ["loading", "complete"], |
| 247 "description": "Whether the tabs have completed loading." |
| 248 }, |
| 249 "title": { |
| 250 "type": "string", |
| 251 "optional": true, |
| 252 "description": "Match page titles against a pattern." |
| 253 }, |
| 254 "url": { |
| 255 "type": "string", |
| 256 "optional": true, |
| 257 "description": "Match tabs against a URL pattern." |
| 258 }, |
| 259 "windowId": { |
| 260 "type": "integer", |
| 261 "optional": true, |
| 262 "minimum": 0, |
| 263 "description": "The ID of the parent window." |
| 264 }, |
| 265 "windowType": { |
| 266 "type": "string", |
| 267 "optional": true, |
| 268 "enum": ["normal", "popup", "panel", "app"], |
| 269 "description": "The type of window the tabs are in." |
| 270 } |
| 271 } |
| 272 }, |
| 273 { |
| 274 "type": "function", |
| 275 "name": "callback", |
| 276 "parameters": [ |
| 277 { |
| 278 "name": "result", |
| 279 "type": "array", |
| 280 "items": { |
| 281 "$ref": "Tab" |
| 282 } |
| 283 } |
| 284 ] |
| 285 } |
| 286 ] |
| 287 }, |
| 288 { |
| 289 "name": "highlight", |
| 290 "type": "function", |
| 291 "description": "Highlights the given tabs.", |
| 292 "parameters": [ |
| 293 { |
| 294 "type": "object", |
| 295 "name": "highlightInfo", |
| 296 "properties": { |
| 297 "windowId": { |
| 298 "type": "integer", |
| 299 "description": "The window that contains the tabs." |
| 300 }, |
| 301 "tabs": { |
| 302 "description": "One or more tab indices to highlight.", |
| 303 "choices": [ |
| 304 {"type": "array", "items": {"type": "integer", "minimum": 0}}
, |
| 305 {"type": "integer"} |
| 306 ] |
| 307 } |
| 308 } |
| 309 }, |
| 310 { |
| 311 "type": "function", |
| 312 "name": "callback", |
| 313 "parameters": [ |
| 314 { |
| 315 "name": "window", |
| 316 "$ref": "Window", |
| 317 "description": "Contains details about the window whose tabs we
re highlighted." |
| 318 } |
| 319 ] |
| 320 } |
| 321 ] |
| 322 }, |
| 323 { |
| 324 "name": "update", |
| 325 "type": "function", |
| 326 "description": "Modifies the properties of a tab. Properties that are no
t specified in <var>updateProperties</var> are not modified. Note: This function
can be used without requesting the 'tabs' permission in the manifest.", |
| 327 "parameters": [ |
| 328 { |
| 329 "type": "integer", |
| 330 "name": "tabId", |
| 331 "minimum": 0, |
| 332 "optional": true, |
| 333 "description": "Defaults to the selected tab of the <a href='windows
.html#current-window'>current window</a>." |
| 334 }, |
| 335 { |
| 336 "type": "object", |
| 337 "name": "updateProperties", |
| 338 "properties": { |
| 339 "url": { |
| 340 "optional": true, |
| 341 "description": "A URL to navigate the tab to." |
| 342 }, |
| 343 "active": { |
| 344 "type": "boolean", |
| 345 "optional": true, |
| 346 "description": "Whether the tab should be active." |
| 347 }, |
| 348 "highlighted": { |
| 349 "type": "boolean", |
| 350 "optional": true, |
| 351 "description": "Adds or removes the tab from the current selecti
on." |
| 352 }, |
| 353 "selected": { |
| 354 "nodoc": true, |
| 355 "type": "boolean", |
| 356 "optional": true, |
| 357 "description": "Whether the tab should be selected." |
| 358 }, |
| 359 "pinned": { |
| 360 "type": "boolean", |
| 361 "optional": true, |
| 362 "description": "Whether the tab should be pinned." |
| 363 } |
| 364 } |
| 365 }, |
| 366 { |
| 367 "type": "function", |
| 368 "name": "callback", |
| 369 "optional": true, |
| 370 "parameters": [ |
| 371 { |
| 372 "name": "tab", |
| 373 "$ref": "Tab", |
| 374 "optional": true, |
| 375 "description": "Details about the updated tab, or <code>null</co
de> if the 'tabs' permission has not been requested." |
| 376 } |
| 377 ] |
| 378 } |
| 379 ] |
| 380 }, |
| 381 { |
| 382 "name": "move", |
| 383 "type": "function", |
| 384 "description": "Moves one or more tabs to a new position within its wind
ow, or to a new window. Note that tabs can only be moved to and from normal (win
dow.type === \"normal\") windows.", |
| 385 "parameters": [ |
| 386 { |
| 387 "name": "tabIds", |
| 388 "description": "The tab or list of tabs to move.", |
| 389 "choices": [ |
| 390 {"type": "integer", "minimum": 0}, |
| 391 {"type": "array", "items": {"type": "integer", "minimum": 0}} |
| 392 ] |
| 393 }, |
| 394 { |
| 395 "type": "object", |
| 396 "name": "moveProperties", |
| 397 "properties": { |
| 398 "windowId": { |
| 399 "type": "integer", |
| 400 "minimum": 0, |
| 401 "optional": true, |
| 402 "description": "Defaults to the window the tab is currently in." |
| 403 }, |
| 404 "index": { |
| 405 "type": "integer", |
| 406 "minimum": 0, |
| 407 "description": "The position to move the window to. The provided
value will be clamped to between zero and the number of tabs in the window." |
| 408 } |
| 409 } |
| 410 }, |
| 411 { |
| 412 "type": "function", |
| 413 "name": "callback", |
| 414 "optional": true, |
| 415 "parameters": [ |
| 416 { |
| 417 "name": "tabs", |
| 418 "description": "Details about the moved tabs.", |
| 419 "choices": [ |
| 420 {"$ref": "Tab"}, |
| 421 {"type": "array", "items": {"$ref": "Tab"}} |
| 422 ] |
| 423 } |
| 424 ] |
| 425 } |
| 426 ] |
| 427 }, |
| 428 { |
| 429 "name": "reload", |
| 430 "type": "function", |
| 431 "description": "Reload a tab.", |
| 432 "parameters": [ |
| 433 {"type": "integer", "name": "tabId", "optional": true, "description":
"The ID of the tab to reload; defaults to the selected tab of the current window
."}, |
| 434 { |
| 435 "type": "object", |
| 436 "name": "reloadProperties", |
| 437 "optional": true, |
| 438 "properties": { |
| 439 "bypassCache": { |
| 440 "type": "boolean", |
| 441 "optional": true, |
| 442 "description": "Whether using any local cache. Default is false.
" |
| 443 } |
| 444 } |
| 445 }, |
| 446 {"type": "function", "name": "callback", "optional": true, "parameters
": []} |
| 447 ] |
| 448 }, |
| 449 { |
| 450 "name": "remove", |
| 451 "type": "function", |
| 452 "description": "Closes one or more tabs. Note: This function can be used
without requesting the 'tabs' permission in the manifest.", |
| 453 "parameters": [ |
| 454 { |
| 455 "name": "tabIds", |
| 456 "description": "The tab or list of tabs to close.", |
| 457 "choices": [ |
| 458 {"type": "integer", "minimum": 0}, |
| 459 {"type": "array", "items": {"type": "integer", "minimum": 0}} |
| 460 ] |
| 461 }, |
| 462 {"type": "function", "name": "callback", "optional": true, "parameters
": []} |
| 463 ] |
| 464 }, |
| 465 { |
| 466 "name": "detectLanguage", |
| 467 "type": "function", |
| 468 "description": "Detects the primary language of the content in a tab.", |
| 469 "parameters": [ |
| 470 { |
| 471 "type": "integer", |
| 472 "name": "tabId", |
| 473 "minimum": 0, |
| 474 "optional": true, |
| 475 "description": "Defaults to the active tab of the <a href='windows.h
tml#current-window'>current window</a>." |
| 476 }, |
| 477 { |
| 478 "type": "function", |
| 479 "name": "callback", |
| 480 "parameters": [ |
| 481 { |
| 482 "type": "string", |
| 483 "name": "language", |
| 484 "description": "An ISO language code such as <code>en</code> or
<code>fr</code>. For a complete list of languages supported by this method, see
<a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languag
es/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be
checked and the first non-NULL value will be returned except for Simplified Chi
nese for which zh-CN will be returned. For an unknown language, <code>und</code>
will be returned." |
| 485 } |
| 486 ] |
| 487 } |
| 488 ] |
| 489 }, |
| 490 { |
| 491 "name": "captureVisibleTab", |
| 492 "type": "function", |
| 493 "description": "Captures the visible area of the currently active tab in
the specified window. You must have <a href='manifest.html#permissions'>host pe
rmission</a> for the URL displayed by the tab.", |
| 494 "parameters": [ |
| 495 { |
| 496 "type": "integer", |
| 497 "name": "windowId", |
| 498 "minimum": 0, |
| 499 "optional": true, |
| 500 "description": "The target window. Defaults to the <a href='windows.
html#current-window'>current window</a>." |
| 501 }, |
| 502 { |
| 503 "type": "object", |
| 504 "name": "options", |
| 505 "optional": true, |
| 506 "description": "Set parameters of image capture, such as the format
of the resulting image.", |
| 507 "properties": { |
| 508 "format": { |
| 509 "type": "string", |
| 510 "optional": true, |
| 511 "enum": ["jpeg", "png"], |
| 512 "description": "The format of the resulting image. Default is j
peg." |
| 513 }, |
| 514 "quality": { |
| 515 "type": "integer", |
| 516 "name": "quality", |
| 517 "optional": true, |
| 518 "minimum": 0, |
| 519 "maximum": 100, |
| 520 "description": "When format is 'jpeg', controls the quality of t
he resulting image. This value is ignored for PNG images. As quality is decrea
sed, the resulting image will have more visual artifacts, and the number of byte
s needed to store it will decrease." |
| 521 } |
| 522 } |
| 523 }, |
| 524 { |
| 525 "type": "function", "name": "callback", "parameters": [ |
| 526 {"type": "string", "name": "dataUrl", "description": "A data URL w
hich encodes an image of the visible area of the captured tab. May be assigned t
o the 'src' property of an HTML Image element for display."} |
| 527 ] |
| 528 } |
| 529 ] |
| 530 }, |
| 531 { |
| 532 "name": "executeScript", |
| 533 "type": "function", |
| 534 "description": "Injects JavaScript code into a page. For details, see th
e <a href='content_scripts.html#pi'>programmatic injection</a> section of the co
ntent scripts doc.", |
| 535 "parameters": [ |
| 536 {"type": "integer", "name": "tabId", "optional": true, "description":
"The ID of the tab in which to run the script; defaults to the active tab of the
current window."}, |
| 537 { |
| 538 "type": "object", |
| 539 "name": "details", |
| 540 "description": "Details of the script to run. Either the code or the
file property must be set, but both may not be set at the same time.", |
| 541 "properties": { |
| 542 "code": {"type": "string", "optional": true, "description": "JavaS
cript code to execute."}, |
| 543 "file": {"type": "string", "optional": true, "description": "JavaS
cript file to execute."}, |
| 544 "allFrames": {"type": "boolean", "optional": true, "description":
"If allFrames is true, this function injects script into all frames of current p
age. By default, it's false and script is injected only into the top main frame.
"} |
| 545 } |
| 546 }, |
| 547 { |
| 548 "type": "function", |
| 549 "name": "callback", |
| 550 "optional": true, |
| 551 "description": "Called after all the JavaScript has been executed.", |
| 552 "parameters": [] |
| 553 } |
| 554 ] |
| 555 }, |
| 556 { |
| 557 "name": "insertCSS", |
| 558 "type": "function", |
| 559 "description": "Injects CSS into a page. For details, see the <a href='c
ontent_scripts.html#pi'>programmatic injection</a> section of the content script
s doc.", |
| 560 "parameters": [ |
| 561 {"type": "integer", "name": "tabId", "optional": true, "description":
"The ID of the tab in which to insert the CSS; defaults to the active tab of the
current window."}, |
| 562 { |
| 563 "type": "object", |
| 564 "name": "details", |
| 565 "description": "Details of the CSS text to insert. Either the code o
r the file property must be set, but both may not be set at the same time.", |
| 566 "properties": { |
| 567 "code": {"type": "string", "optional": true, "description": "CSS c
ode to be injected."}, |
| 568 "file": {"type": "string", "optional": true, "description": "CSS f
ile to be injected."}, |
| 569 "allFrames": {"type": "boolean", "optional": true, "description":
"If allFrames is true, this function injects CSS text into all frames of current
page. By default, it's false and CSS is injected only into the top main frame."
} |
| 570 } |
| 571 }, |
| 572 { |
| 573 "type": "function", |
| 574 "name": "callback", |
| 575 "optional": true, |
| 576 "description": "Called when all the CSS has been inserted.", |
| 577 "parameters": [] |
| 578 } |
| 579 ] |
| 580 } |
| 581 ], |
| 582 "events": [ |
| 583 { |
| 584 "name": "onCreated", |
| 585 "type": "function", |
| 586 "description": "Fired when a tab is created. Note that the tab's URL may
not be set at the time this event fired, but you can listen to onUpdated events
to be notified when a URL is set.", |
| 587 "parameters": [ |
| 588 { |
| 589 "$ref": "Tab", |
| 590 "name": "tab", |
| 591 "description": "Details of the tab that was created." |
| 592 } |
| 593 ] |
| 594 }, |
| 595 { |
| 596 "name": "onUpdated", |
| 597 "type": "function", |
| 598 "description": "Fired when a tab is updated.", |
| 599 "parameters": [ |
| 600 {"type": "integer", "name": "tabId", "minimum": 0}, |
| 601 { |
| 602 "type": "object", |
| 603 "name": "changeInfo", |
| 604 "description": "Lists the changes to the state of the tab that was u
pdated.", |
| 605 "properties": { |
| 606 "status": { |
| 607 "type": "string", |
| 608 "optional": true, |
| 609 "description": "The status of the tab. Can be either <em>loading
</em> or <em>complete</em>." |
| 610 }, |
| 611 "url": { |
| 612 "type": "string", |
| 613 "optional": true, |
| 614 "description": "The tab's URL if it has changed." |
| 615 }, |
| 616 "pinned": { |
| 617 "type": "boolean", |
| 618 "optional": true, |
| 619 "description": "The tab's new pinned state." |
| 620 } |
| 621 } |
| 622 }, |
| 623 { |
| 624 "$ref": "Tab", |
| 625 "name": "tab", |
| 626 "description": "Gives the state of the tab that was updated." |
| 627 } |
| 628 ] |
| 629 }, |
| 630 { |
| 631 "name": "onMoved", |
| 632 "type": "function", |
| 633 "description": "Fired when a tab is moved within a window. Only one move
event is fired, representing the tab the user directly moved. Move events are n
ot fired for the other tabs that must move in response. This event is not fired
when a tab is moved between windows. For that, see <a href='#event-onDetached'>o
nDetached</a>.", |
| 634 "parameters": [ |
| 635 {"type": "integer", "name": "tabId", "minimum": 0}, |
| 636 { |
| 637 "type": "object", |
| 638 "name": "moveInfo", |
| 639 "properties": { |
| 640 "windowId": {"type": "integer", "minimum": 0}, |
| 641 "fromIndex": {"type": "integer", "minimum": 0}, |
| 642 "toIndex": {"type": "integer", "minimum": 0} |
| 643 } |
| 644 } |
| 645 ] |
| 646 }, |
| 647 { |
| 648 "name": "onSelectionChanged", |
| 649 "nodoc": true, |
| 650 "type": "function", |
| 651 "description": "Deprecated. Please use onActiveChanged.", |
| 652 "parameters": [ |
| 653 { |
| 654 "type": "integer", |
| 655 "name": "tabId", |
| 656 "minimum": 0, |
| 657 "description": "The ID of the tab that has become active." |
| 658 }, |
| 659 { |
| 660 "type": "object", |
| 661 "name": "selectInfo", |
| 662 "properties": { |
| 663 "windowId": { |
| 664 "type": "integer", |
| 665 "minimum": 0, |
| 666 "description": "The ID of the window the selected tab changed in
side of." |
| 667 } |
| 668 } |
| 669 } |
| 670 ] |
| 671 }, |
| 672 { |
| 673 "name": "onActiveChanged", |
| 674 "type": "function", |
| 675 "description": "Fires when the selected tab in a window changes.", |
| 676 "parameters": [ |
| 677 { |
| 678 "type": "integer", |
| 679 "name": "tabId", |
| 680 "minimum": 0, |
| 681 "description": "The ID of the tab that has become active." |
| 682 }, |
| 683 { |
| 684 "type": "object", |
| 685 "name": "selectInfo", |
| 686 "properties": { |
| 687 "windowId": { |
| 688 "type": "integer", |
| 689 "minimum": 0, |
| 690 "description": "The ID of the window the selected tab changed in
side of." |
| 691 } |
| 692 } |
| 693 } |
| 694 ] |
| 695 }, |
| 696 { |
| 697 "name": "onHighlightChanged", |
| 698 "type": "function", |
| 699 "description": "Fired when the highlighted or selected tabs in a window
changes.", |
| 700 "parameters": [ |
| 701 { |
| 702 "type": "object", |
| 703 "name": "selectInfo", |
| 704 "properties": { |
| 705 "windowId": { |
| 706 "type": "integer", |
| 707 "minimum": 0, |
| 708 "description": "The window whose tabs changed." |
| 709 }, |
| 710 "tabIds": { |
| 711 "type": "array", |
| 712 "name": "tabIds", |
| 713 "items": {"type": "integer", "minimum": 0}, |
| 714 "description": "All highlighted tabs in the window." |
| 715 } |
| 716 } |
| 717 } |
| 718 ] |
| 719 }, |
| 720 { |
| 721 "name": "onDetached", |
| 722 "type": "function", |
| 723 "description": "Fired when a tab is detached from a window, for example
because it is being moved between windows.", |
| 724 "parameters": [ |
| 725 {"type": "integer", "name": "tabId", "minimum": 0}, |
| 726 { |
| 727 "type": "object", |
| 728 "name": "detachInfo", |
| 729 "properties": { |
| 730 "oldWindowId": {"type": "integer", "minimum": 0}, |
| 731 "oldPosition": {"type": "integer", "minimum": 0} |
| 732 } |
| 733 } |
| 734 ] |
| 735 }, |
| 736 { |
| 737 "name": "onAttached", |
| 738 "type": "function", |
| 739 "description": "Fired when a tab is attached to a window, for example be
cause it was moved between windows.", |
| 740 "parameters": [ |
| 741 {"type": "integer", "name": "tabId", "minimum": 0}, |
| 742 { |
| 743 "type": "object", |
| 744 "name": "attachInfo", |
| 745 "properties": { |
| 746 "newWindowId": {"type": "integer", "minimum": 0}, |
| 747 "newPosition": {"type": "integer", "minimum": 0} |
| 748 } |
| 749 } |
| 750 ] |
| 751 }, |
| 752 { |
| 753 "name": "onRemoved", |
| 754 "type": "function", |
| 755 "description": "Fired when a tab is closed. Note: A listener can be regi
stered for this event without requesting the 'tabs' permission in the manifest."
, |
| 756 "parameters": [ |
| 757 {"type": "integer", "name": "tabId", "minimum": 0}, |
| 758 { |
| 759 "type": "object", |
| 760 "name": "removeInfo", |
| 761 "properties": { |
| 762 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } |
| 763 } |
| 764 } |
| 765 ] |
| 766 } |
| 767 ] |
| 768 } |
| 769 ] |
OLD | NEW |