[PENDING: API Module Overview Goes Here]

chrome.tabs API reference

Methods

get

void chrome.tabs.get(, integer tabId, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(Tab tab) {...});
tab
( Tab array of integer )
Undocumented.
Description of this parameter from the json schema.

connect

Port chrome.tabs.connect(, integer tabId, string name)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

tabId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
name
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.

Returns

tabId
( Port array of integer )
Undocumented.
Description of this parameter from the json schema.

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(Type param1, Type param2) {...});

getSelected

void chrome.tabs.getSelected(, integer windowId, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

windowId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(Tab tab) {...});
tab
( Tab array of integer )
Undocumented.
Description of this parameter from the json schema.

getAllInWindow

void chrome.tabs.getAllInWindow(, integer windowId, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

windowId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(array of Tab tabs) {...});
tabs
( Type array of Tab array of integer integer )
Undocumented.
Description of this parameter from the json schema.

create

void chrome.tabs.create(, object createProperties, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

createProperties
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
windowId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
index
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
url
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.
selected
( optional Type array of boolean )
Undocumented.
Description of this parameter from the json schema.
callback
( optional Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(Tab tab) {...});
tab
( Tab array of integer )
Undocumented.
Description of this parameter from the json schema.

update

void chrome.tabs.update(, integer tabId, object updateProperties, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
updateProperties
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
url
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.
selected
( optional Type array of boolean )
Undocumented.
Description of this parameter from the json schema.
callback
( optional Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function() {...});

move

void chrome.tabs.move(, integer tabId, object moveProperties, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
moveProperties
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
windowId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
index
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( optional Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function() {...});

remove

void chrome.tabs.remove(, integer tabId, function callback)

Undocumented.

A description from the json schema def of the function goes here.

Parameters

tabId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( optional Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function() {...});

detectLanguage

void chrome.tabs.detectLanguage(, integer tabId, function callback)

detect language of tab.

Parameters

tabId
( optional Type array of integer )
Undocumented.
Description of this parameter from the json schema.
callback
( Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(string language) {...});
language
( Type array of string )
Undocumented.
Description of this parameter from the json schema.

captureVisibleTab

void chrome.tabs.captureVisibleTab(, integer windowId, function callback)

Captures the visible area of the visible tab in the given window.

Parameters

windowId
( optional Type array of integer )
The target window. If null or undefined, the 'current' window will be assumed.
callback
( Type array of function )
Undocumented.
Description of this parameter from the json schema.

Returns

Callback function

If you specify the callback parameter, it should specify a function that looks like this:

function(string dataUrl) {...});
dataUrl
( Type array of string )
a data url encoding of the captured tab.

Events

onCreated

chrome.tabs.onCreated.addListener(function(Tab tab) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tab
( Tab array of integer )
Undocumented.
Description of this parameter from the json schema.

onUpdated

chrome.tabs.onUpdated.addListener(function(integer tabId, object changeInfo) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
changeInfo
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
status
( Type array of string )
Undocumented.
Description of this parameter from the json schema.
url
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.

onMoved

chrome.tabs.onMoved.addListener(function(integer tabId, object moveInfo) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
moveInfo
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
windowId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
fromIndex
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
toIndex
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.

onSelectionChanged

chrome.tabs.onSelectionChanged.addListener(function(integer tabId, object selectInfo) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
selectInfo
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
windowId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.

onAttached

chrome.tabs.onAttached.addListener(function(integer tabId, object attachInfo) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
attachInfo
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
newWindowId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
newPosition
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.

onDetached

chrome.tabs.onDetached.addListener(function(integer tabId, object detachInfo) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
detachInfo
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
oldWindowId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
oldPosition
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.

onRemoved

chrome.tabs.onRemoved.addListener(function(integer tabId) {...});

Undocumented.

A description from the json schema def of the event goes here.

Parameters

tabId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.

Types

Tab

tabId
( Type array of object )
Undocumented.
Description of this parameter from the json schema.
id
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
index
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
windowId
( Type array of integer )
Undocumented.
Description of this parameter from the json schema.
selected
( Type array of boolean )
Undocumented.
Description of this parameter from the json schema.
url
( Type array of string )
Undocumented.
Description of this parameter from the json schema.
title
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.
favIconUrl
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.
status
( optional Type array of string )
Undocumented.
Description of this parameter from the json schema.