summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 19:07:21 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 19:07:21 +0000
commit5592d7ec9c8b63cca9ab980d4c2d9888dafc3761 (patch)
treeb84940449246e80d5db8ad0e2aefa718a1e86bd9 /chrome
parent6a2da2a134813c7820f89d6c750287663bfed078 (diff)
downloadchromium_src-5592d7ec9c8b63cca9ab980d4c2d9888dafc3761.zip
chromium_src-5592d7ec9c8b63cca9ab980d4c2d9888dafc3761.tar.gz
chromium_src-5592d7ec9c8b63cca9ab980d4c2d9888dafc3761.tar.bz2
Extension API Renaming/Consistency changes
BUG=20288 Review URL: http://codereview.chromium.org/180016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc6
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module_constants.cc3
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module_constants.h3
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc25
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc6
-rw-r--r--chrome/browser/extensions/extension_messages_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc96
-rw-r--r--chrome/browser/extensions/extension_tabs_module.h4
-rw-r--r--chrome/browser/extensions/extension_tabs_module_constants.cc5
-rw-r--r--chrome/browser/extensions/extension_tabs_module_constants.h3
-rw-r--r--chrome/browser/extensions/extension_toolstrip_api.cc49
-rw-r--r--chrome/browser/extensions/extension_uitest.cc36
-rw-r--r--chrome/common/common_resources.grd2
-rwxr-xr-xchrome/common/extensions/api/extension_api.json66
-rwxr-xr-xchrome/common/extensions/docs/api_other.html35
-rwxr-xr-xchrome/common/extensions/docs/content_scripts.html2
-rwxr-xr-xchrome/common/extensions/docs/getstarted.html2
-rwxr-xr-xchrome/common/extensions/docs/overview.html2
-rwxr-xr-xchrome/common/extensions/docs/packaging.html2
-rwxr-xr-xchrome/common/extensions/docs/pageActions.html2
-rwxr-xr-xchrome/common/extensions/docs/tabs.html2
-rw-r--r--chrome/renderer/extensions/extension_api_client_unittest.cc56
-rw-r--r--chrome/renderer/renderer_resources.grd2
-rw-r--r--chrome/renderer/resources/extension_process_bindings.js32
-rw-r--r--chrome/renderer/resources/renderer_extension_bindings.js12
-rwxr-xr-xchrome/test/data/extensions/browsertest/last_error/toolstrip.html2
-rw-r--r--chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js7
-rw-r--r--chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/toolstrip.html145
-rw-r--r--chrome/test/data/extensions/samples/bookmarks/bookmark_api.html4
-rw-r--r--chrome/test/data/extensions/samples/bookmarks/bookmark_view.html10
-rw-r--r--chrome/test/data/extensions/samples/bookmarks/manifest.json3
-rwxr-xr-xchrome/test/data/extensions/samples/mole/manifest.json7
-rwxr-xr-xchrome/test/data/extensions/samples/mole/mole.html67
-rw-r--r--chrome/test/data/extensions/samples/subscribe_page_action/background.html7
-rw-r--r--chrome/test/data/extensions/samples/tabs/tabs_api.html12
-rw-r--r--chrome/test/data/extensions/uitest/event_sink/test.html8
36 files changed, 441 insertions, 286 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 66ecd57..1edef1c 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -203,7 +203,7 @@ void ExtensionBookmarkEventRouter::BookmarkNodeAdded(BookmarkModel* model,
std::string json_args;
JSONWriter::Write(&args, false, &json_args);
- DispatchEvent(model->profile(), keys::kOnBookmarkAdded, json_args);
+ DispatchEvent(model->profile(), keys::kOnBookmarkCreated, json_args);
}
void ExtensionBookmarkEventRouter::BookmarkNodeRemoved(
@@ -258,7 +258,9 @@ void ExtensionBookmarkEventRouter::BookmarkNodeChildrenReordered(
Value* child_id = new StringValue(Int64ToString(child->id()));
children->Append(child_id);
}
- args.Append(children);
+ DictionaryValue* reorder_info = new DictionaryValue();
+ reorder_info->Set(keys::kChildIdsKey, children);
+ args.Append(reorder_info);
std::string json_args;
JSONWriter::Write(&args, false, &json_args);
diff --git a/chrome/browser/extensions/extension_bookmarks_module_constants.cc b/chrome/browser/extensions/extension_bookmarks_module_constants.cc
index 222728b..ef4e3f4 100644
--- a/chrome/browser/extensions/extension_bookmarks_module_constants.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module_constants.cc
@@ -14,6 +14,7 @@ const wchar_t kOldParentIdKey[] = L"oldParentId";
const wchar_t kUrlKey[] = L"url";
const wchar_t kTitleKey[] = L"title";
const wchar_t kChildrenKey[] = L"children";
+const wchar_t kChildIdsKey[] = L"childIds";
const wchar_t kRecursiveKey[] = L"recursive";
const wchar_t kDateAddedKey[] = L"dateAdded";
const wchar_t kDateGroupModifiedKey[] = L"dateGroupModified";
@@ -27,7 +28,7 @@ const char kInvalidIndexError[] = "Index out of bounds.";
const char kInvalidUrlError[] = "Invalid URL.";
const char kModifySpecialError[] = "Can't modify the root bookmark folders.";
-const char kOnBookmarkAdded[] = "bookmarks.onAdded";
+const char kOnBookmarkCreated[] = "bookmarks.onCreated";
const char kOnBookmarkRemoved[] = "bookmarks.onRemoved";
const char kOnBookmarkChanged[] = "bookmarks.onChanged";
const char kOnBookmarkMoved[] = "bookmarks.onMoved";
diff --git a/chrome/browser/extensions/extension_bookmarks_module_constants.h b/chrome/browser/extensions/extension_bookmarks_module_constants.h
index 7c2af58..5f49b44 100644
--- a/chrome/browser/extensions/extension_bookmarks_module_constants.h
+++ b/chrome/browser/extensions/extension_bookmarks_module_constants.h
@@ -18,6 +18,7 @@ extern const wchar_t kOldParentIdKey[];
extern const wchar_t kUrlKey[];
extern const wchar_t kTitleKey[];
extern const wchar_t kChildrenKey[];
+extern const wchar_t kChildIdsKey[];
extern const wchar_t kRecursiveKey[];
extern const wchar_t kDateAddedKey[];
extern const wchar_t kDateGroupModifiedKey[];
@@ -32,7 +33,7 @@ extern const char kInvalidUrlError[];
extern const char kModifySpecialError[];
// Events.
-extern const char kOnBookmarkAdded[];
+extern const char kOnBookmarkCreated[];
extern const char kOnBookmarkRemoved[];
extern const char kOnBookmarkChanged[];
extern const char kOnBookmarkMoved[];
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 5a31978..9e09da4 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -119,9 +119,19 @@ void ExtensionBrowserEventRouter::OnBrowserAdded(const Browser* browser) {
// Start listening to TabStripModel events for this browser.
browser->tabstrip_model()->AddObserver(this);
- DispatchSimpleBrowserEvent(browser->profile(),
- ExtensionTabUtil::GetWindowId(browser),
- events::kOnWindowCreated);
+ ListValue args;
+ // TODO(rafaelw): This would ideally be returning a full Window object
+ // via ExtensionTabUtil::CreateWindowValue(), but the browser->window()
+ // isn't ready at the time we get the OnBrowserAdded event.
+ DictionaryValue* window_dictionary = new DictionaryValue();
+ window_dictionary->SetInteger(extension_tabs_module_constants::kIdKey,
+ ExtensionTabUtil::GetWindowId(browser));
+ args.Append(window_dictionary);
+
+ std::string json_args;
+ JSONWriter::Write(&args, false, &json_args);
+
+ DispatchEvent(browser->profile(), events::kOnWindowCreated, json_args);
}
void ExtensionBrowserEventRouter::OnBrowserRemoving(const Browser* browser) {
@@ -337,15 +347,14 @@ void ExtensionBrowserEventRouter::PageActionExecuted(
int tab_id,
const std::string& url) {
ListValue args;
- DictionaryValue* object_args = new DictionaryValue();
- object_args->Set(tab_keys::kPageActionIdKey,
- Value::CreateStringValue(page_action_id));
+
+ args.Append(Value::CreateStringValue(page_action_id));
+
DictionaryValue* data = new DictionaryValue();
data->Set(tab_keys::kTabIdKey, Value::CreateIntegerValue(tab_id));
data->Set(tab_keys::kTabUrlKey, Value::CreateStringValue(url));
- object_args->Set(tab_keys::kDataKey, data);
- args.Append(object_args);
+ args.Append(data);
std::string json_args;
JSONWriter::Write(&args, false, &json_args);
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index 4ec9351..3165c59 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -424,6 +424,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MessagingContentScript) {
host->render_view_host(), L"", L"testPostMessage()", &result);
EXPECT_TRUE(result);
+ // Test port naming
+ result = false;
+ ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ host->render_view_host(), L"", L"testPortName()", &result);
+ EXPECT_TRUE(result);
+
// Test tab->extension messaging.
result = false;
ui_test_utils::ExecuteJavaScriptAndExtractBool(
diff --git a/chrome/browser/extensions/extension_messages_unittest.cc b/chrome/browser/extensions/extension_messages_unittest.cc
index 7bf402f..aa6615c 100644
--- a/chrome/browser/extensions/extension_messages_unittest.cc
+++ b/chrome/browser/extensions/extension_messages_unittest.cc
@@ -42,7 +42,7 @@ TEST_F(RenderViewTest, ExtensionMessagesOpenChannel) {
LoadHTML("<body></body>");
ExecuteJavaScript(
"var e = new chrome.Extension('foobar');"
- "var port = e.connect('testName');"
+ "var port = e.connect({name:'testName'});"
"port.onMessage.addListener(doOnMessage);"
"port.postMessage({message: 'content ready'});"
"function doOnMessage(msg, port) {"
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 73154ac..3b57ea9 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -30,8 +30,6 @@
namespace keys = extension_tabs_module_constants;
// Forward declare static helper functions defined below.
-static DictionaryValue* CreateWindowValue(Browser* browser, bool populate_tabs);
-static ListValue* CreateTabList(Browser* browser);
// |error_message| can optionally be passed in a will be set with an appropriate
// message if the window cannot be found by id.
@@ -97,6 +95,17 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(
return ExtensionTabUtil::CreateTabValue(contents, NULL, -1);
}
+ListValue* ExtensionTabUtil::CreateTabList(const Browser* browser) {
+ ListValue* tab_list = new ListValue();
+ TabStripModel* tab_strip = browser->tabstrip_model();
+ for (int i = 0; i < tab_strip->count(); ++i) {
+ tab_list->Append(ExtensionTabUtil::CreateTabValue(
+ tab_strip->GetTabContentsAt(i), tab_strip, i));
+ }
+
+ return tab_list;
+}
+
DictionaryValue* ExtensionTabUtil::CreateTabValue(
const TabContents* contents, TabStripModel* tab_strip, int tab_index) {
TabStatus status = GetTabStatus(contents);
@@ -124,6 +133,33 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(
return result;
}
+// if |populate| is true, each window gets a list property |tabs| which contains
+// fully populated tab objects.
+DictionaryValue* ExtensionTabUtil::CreateWindowValue(const Browser* browser,
+ bool populate_tabs) {
+ DictionaryValue* result = new DictionaryValue();
+ result->SetInteger(keys::kIdKey, ExtensionTabUtil::GetWindowId(
+ browser));
+ bool focused = false;
+ if (browser->window())
+ focused = browser->window()->IsActive();
+
+ result->SetBoolean(keys::kFocusedKey, focused);
+ gfx::Rect bounds = browser->window()->GetRestoredBounds();
+
+ // TODO(rafaelw): zIndex ?
+ result->SetInteger(keys::kLeftKey, bounds.x());
+ result->SetInteger(keys::kTopKey, bounds.y());
+ result->SetInteger(keys::kWidthKey, bounds.width());
+ result->SetInteger(keys::kHeightKey, bounds.height());
+
+ if (populate_tabs) {
+ result->Set(keys::kTabsKey, ExtensionTabUtil::CreateTabList(browser));
+ }
+
+ return result;
+}
+
bool ExtensionTabUtil::GetTabById(int tab_id, Profile* profile,
Browser** browser,
TabStripModel** tab_strip,
@@ -166,7 +202,7 @@ bool GetWindowFunction::RunImpl() {
if (!browser)
return false;
- result_.reset(CreateWindowValue(browser, false));
+ result_.reset(ExtensionTabUtil::CreateWindowValue(browser, false));
return true;
}
@@ -176,7 +212,7 @@ bool GetCurrentWindowFunction::RunImpl() {
error_ = keys::kNoCurrentWindowError;
return false;
}
- result_.reset(CreateWindowValue(browser, false));
+ result_.reset(ExtensionTabUtil::CreateWindowValue(browser, false));
return true;
}
@@ -186,14 +222,19 @@ bool GetLastFocusedWindowFunction::RunImpl() {
error_ = keys::kNoLastFocusedWindowError;
return false;
}
- result_.reset(CreateWindowValue(browser, false));
+ result_.reset(ExtensionTabUtil::CreateWindowValue(browser, false));
return true;
}
bool GetAllWindowsFunction::RunImpl() {
bool populate_tabs = false;
if (!args_->IsType(Value::TYPE_NULL)) {
- EXTENSION_FUNCTION_VALIDATE(args_->GetAsBoolean(&populate_tabs));
+ EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY));
+ const DictionaryValue* args = static_cast<const DictionaryValue*>(args_);
+ if (args->HasKey(keys::kPopulateKey)) {
+ EXTENSION_FUNCTION_VALIDATE(args->GetBoolean(keys::kPopulateKey,
+ &populate_tabs));
+ }
}
result_.reset(new ListValue());
@@ -202,7 +243,7 @@ bool GetAllWindowsFunction::RunImpl() {
// Only examine browsers in the current profile.
if ((*browser)->profile() == profile()) {
static_cast<ListValue*>(result_.get())->
- Append(CreateWindowValue(*browser, populate_tabs));
+ Append(ExtensionTabUtil::CreateWindowValue(*browser, populate_tabs));
}
}
@@ -280,7 +321,7 @@ bool CreateWindowFunction::RunImpl() {
// TODO(rafaelw): support |focused|, |zIndex|
- result_.reset(CreateWindowValue(new_window, false));
+ result_.reset(ExtensionTabUtil::CreateWindowValue(new_window, false));
return true;
}
@@ -330,7 +371,7 @@ bool UpdateWindowFunction::RunImpl() {
browser->window()->SetBounds(bounds);
// TODO(rafaelw): Support |focused|.
- result_.reset(CreateWindowValue(browser, false));
+ result_.reset(ExtensionTabUtil::CreateWindowValue(browser, false));
return true;
}
@@ -392,7 +433,7 @@ bool GetAllTabsInWindowFunction::RunImpl() {
if (!browser)
return false;
- result_.reset(CreateTabList(browser));
+ result_.reset(ExtensionTabUtil::CreateTabList(browser));
return true;
}
@@ -768,41 +809,6 @@ void DetectTabLanguageFunction::Observe(NotificationType type,
// static helpers
-// if |populate| is true, each window gets a list property |tabs| which contains
-// fully populated tab objects.
-static DictionaryValue* CreateWindowValue(Browser* browser,
- bool populate_tabs) {
- DictionaryValue* result = new DictionaryValue();
- result->SetInteger(keys::kIdKey, ExtensionTabUtil::GetWindowId(
- browser));
- result->SetBoolean(keys::kFocusedKey,
- browser->window()->IsActive());
- gfx::Rect bounds = browser->window()->GetRestoredBounds();
-
- // TODO(rafaelw): zIndex ?
- result->SetInteger(keys::kLeftKey, bounds.x());
- result->SetInteger(keys::kTopKey, bounds.y());
- result->SetInteger(keys::kWidthKey, bounds.width());
- result->SetInteger(keys::kHeightKey, bounds.height());
-
- if (populate_tabs) {
- result->Set(keys::kTabsKey, CreateTabList(browser));
- }
-
- return result;
-}
-
-static ListValue* CreateTabList(Browser* browser) {
- ListValue* tab_list = new ListValue();
- TabStripModel* tab_strip = browser->tabstrip_model();
- for (int i = 0; i < tab_strip->count(); ++i) {
- tab_list->Append(ExtensionTabUtil::CreateTabValue(
- tab_strip->GetTabContentsAt(i), tab_strip, i));
- }
-
- return tab_list;
-}
-
static Browser* GetBrowserInProfileWithId(Profile* profile,
const int window_id,
std::string* error_message) {
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h
index a0d53c8..eccd823 100644
--- a/chrome/browser/extensions/extension_tabs_module.h
+++ b/chrome/browser/extensions/extension_tabs_module.h
@@ -13,6 +13,7 @@
class Browser;
class DictionaryValue;
+class ListValue;
class TabContents;
class TabStripModel;
@@ -30,10 +31,13 @@ class ExtensionTabUtil {
static TabStatus GetTabStatus(const TabContents* tab_contents);
static std::string GetTabStatusText(TabStatus status);
static int GetWindowIdOfTab(const TabContents* tab_contents);
+ static ListValue* CreateTabList(const Browser* browser);
static DictionaryValue* CreateTabValue(const TabContents* tab_contents);
static DictionaryValue* CreateTabValue(const TabContents* tab_contents,
TabStripModel* tab_strip,
int tab_index);
+ static DictionaryValue* CreateWindowValue(const Browser* browser,
+ bool populate_tabs);
// Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may
// be NULL and will not be set within the function.
diff --git a/chrome/browser/extensions/extension_tabs_module_constants.cc b/chrome/browser/extensions/extension_tabs_module_constants.cc
index 92abf87..da73ec6 100644
--- a/chrome/browser/extensions/extension_tabs_module_constants.cc
+++ b/chrome/browser/extensions/extension_tabs_module_constants.cc
@@ -6,7 +6,6 @@
namespace extension_tabs_module_constants {
-const wchar_t kDataKey[] = L"data";
const wchar_t kFavIconUrlKey[] = L"favIconUrl";
const wchar_t kFocusedKey[] = L"focused";
const wchar_t kFromIndexKey[] = L"fromIndex";
@@ -18,7 +17,7 @@ const wchar_t kNewPositionKey[] = L"newPosition";
const wchar_t kNewWindowIdKey[] = L"newWindowId";
const wchar_t kOldPositionKey[] = L"oldPosition";
const wchar_t kOldWindowIdKey[] = L"oldWindowId";
-const wchar_t kPageActionIdKey[] = L"pageActionId";
+const wchar_t kPopulateKey[] = L"populate";
const wchar_t kSelectedKey[] = L"selected";
const wchar_t kStatusKey[] = L"status";
const wchar_t kTabIdKey[] = L"tabId";
@@ -40,7 +39,7 @@ const char kWindowNotFoundError[] = "No window with id: *.";
const char kTabNotFoundError[] = "No tab with id: *.";
const char kNoSelectedTabError[] = "No selected tab";
const char kInvalidUrlError[] = "Invalid url: \"*\".";
-const char kInternalVisibleTabCaptureError[] =
+const char kInternalVisibleTabCaptureError[] =
"Internal error while trying to capture visible region of the current tab";
const char kNotImplementedError[] = "This call is not yet implemented";
diff --git a/chrome/browser/extensions/extension_tabs_module_constants.h b/chrome/browser/extensions/extension_tabs_module_constants.h
index dbf2ef0..e6e73a0 100644
--- a/chrome/browser/extensions/extension_tabs_module_constants.h
+++ b/chrome/browser/extensions/extension_tabs_module_constants.h
@@ -10,7 +10,6 @@
namespace extension_tabs_module_constants {
// Keys used in serializing tab data & events.
-extern const wchar_t kDataKey[];
extern const wchar_t kFavIconUrlKey[];
extern const wchar_t kFocusedKey[];
extern const wchar_t kFromIndexKey[];
@@ -22,7 +21,7 @@ extern const wchar_t kNewPositionKey[];
extern const wchar_t kNewWindowIdKey[];
extern const wchar_t kOldPositionKey[];
extern const wchar_t kOldWindowIdKey[];
-extern const wchar_t kPageActionIdKey[];
+extern const wchar_t kPopulateKey[];
extern const wchar_t kSelectedKey[];
extern const wchar_t kStatusKey[];
extern const wchar_t kTabIdKey[];
diff --git a/chrome/browser/extensions/extension_toolstrip_api.cc b/chrome/browser/extensions/extension_toolstrip_api.cc
index 248eedb..8f70243 100644
--- a/chrome/browser/extensions/extension_toolstrip_api.cc
+++ b/chrome/browser/extensions/extension_toolstrip_api.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_shelf_model.h"
+#include "chrome/browser/extensions/extension_tabs_module_constants.h"
namespace extension_toolstrip_api_functions {
const char kExpandFunction[] = "toolstrip.expand";
@@ -26,6 +27,8 @@ const int kMinHeight = 50;
const int kMaxHeight = 1000;
}; // namespace
+namespace keys = extension_tabs_module_constants;
+
bool ToolstripFunction::RunImpl() {
ExtensionHost* host = dispatcher()->GetExtensionHost();
if (!host) {
@@ -58,30 +61,28 @@ bool ToolstripExpandFunction::RunImpl() {
return false;
}
- EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_LIST));
- const ListValue* args = static_cast<const ListValue*>(args_);
- EXTENSION_FUNCTION_VALIDATE(args->GetSize() <= 2);
+ EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY));
+ const DictionaryValue* args = static_cast<const DictionaryValue*>(args_);
int height;
- EXTENSION_FUNCTION_VALIDATE(args->GetInteger(0, &height));
+ EXTENSION_FUNCTION_VALIDATE(args->GetInteger(keys::kHeightKey,
+ &height));
EXTENSION_FUNCTION_VALIDATE(height >= 0);
if (height < kMinHeight || height > kMaxHeight) {
error_ = kBadHeightError;
return false;
}
+
GURL url;
- if (args->GetSize() == 2) {
- Value* url_val;
- EXTENSION_FUNCTION_VALIDATE(args->Get(1, &url_val));
- if (url_val->GetType() != Value::TYPE_NULL) {
- std::string url_str;
- EXTENSION_FUNCTION_VALIDATE(url_val->GetAsString(&url_str));
- url = GURL(url_str);
- if (!url.is_valid() && !url.is_empty()) {
- error_ = kInvalidURLError;
- return false;
- }
+ if (args->HasKey(keys::kUrlKey)) {
+ std::string url_string;
+ EXTENSION_FUNCTION_VALIDATE(args->GetString(keys::kUrlKey,
+ &url_string));
+ url = GURL(url_string);
+ if (!url.is_valid() && !url.is_empty()) {
+ error_ = kInvalidURLError;
+ return false;
}
}
@@ -100,12 +101,18 @@ bool ToolstripCollapseFunction::RunImpl() {
GURL url;
if (args_->GetType() != Value::TYPE_NULL) {
- std::string url_str;
- EXTENSION_FUNCTION_VALIDATE(args_->GetAsString(&url_str));
- url = GURL(url_str);
- if (!url.is_valid() && !url.is_empty()) {
- error_ = kInvalidURLError;
- return false;
+ EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY));
+ const DictionaryValue* args = static_cast<const DictionaryValue*>(args_);
+
+ if (args->HasKey(keys::kUrlKey)) {
+ std::string url_string;
+ EXTENSION_FUNCTION_VALIDATE(args->GetString(keys::kUrlKey,
+ &url_string));
+ url = GURL(url_string);
+ if (!url.is_valid() && !url.is_empty()) {
+ error_ = kInvalidURLError;
+ return false;
+ }
}
}
diff --git a/chrome/browser/extensions/extension_uitest.cc b/chrome/browser/extensions/extension_uitest.cc
index 0f189ea..0d48dcd 100644
--- a/chrome/browser/extensions/extension_uitest.cc
+++ b/chrome/browser/extensions/extension_uitest.cc
@@ -248,7 +248,8 @@ class RoundtripAutomationProxy : public MultiMessageAutomationProxy {
std::string tab_json;
JSONWriter::Write(&tab_dict, false, &tab_json);
- EXPECT_TRUE(response_dict.SetString(keys::kAutomationResponseKey, tab_json));
+ EXPECT_TRUE(response_dict.SetString(keys::kAutomationResponseKey,
+ tab_json));
std::string response_json;
JSONWriter::Write(&response_dict, false, &response_json);
@@ -335,40 +336,41 @@ class BrowserEventAutomationProxy : public MultiMessageAutomationProxy {
const char* BrowserEventAutomationProxy::events_[] = {
// Window events.
- "[\"windows.onCreated\", \"[42]\"]",
-
+ "[\"windows.onCreated\", \"[{'id':42}]\"]",
+
"[\"windows.onRemoved\", \"[42]\"]",
-
+
"[\"windows.onFocusChanged\", \"[42]\"]",
-
+
// Tab events.
"[\"tabs.onCreated\", \"[{'id\':42,'index':1,'windowId':1,"
"'selected':true,'url':'http://www.google.com'}]\"]",
-
+
"[\"tabs.onUpdated\", \"[42, {'status': 'complete',"
"'url':'http://www.google.com'}]\"]",
-
+
"[\"tabs.onMoved\", \"[42, {'windowId':1,'fromIndex':1,'toIndex':2}]\"]",
-
+
"[\"tabs.onSelectionChanged\", \"[42, {'windowId':1}]\"]",
-
+
"[\"tabs.onAttached\", \"[42, {'newWindowId':1,'newPosition':1}]\"]",
-
+
"[\"tabs.onDetached\", \"[43, {'oldWindowId':1,'oldPosition':1}]\"]",
-
+
"[\"tabs.onRemoved\", \"[43]\"]",
// Bookmark events.
- "[\"bookmarks.onAdded\", \"['42', {'id':'42','title':'foo',}]\"]",
-
+ "[\"bookmarks.onCreated\", \"['42', {'id':'42','title':'foo',}]\"]",
+
"[\"bookmarks.onRemoved\", \"['42', {'parentId':'2','index':1}]\"]",
-
+
"[\"bookmarks.onChanged\", \"['42', {'title':'foo'}]\"]",
-
+
"[\"bookmarks.onMoved\", \"['42', {'parentId':'2','index':1,"
"'oldParentId':'3','oldIndex':2}]\"]",
-
- "[\"bookmarks.onChildrenReordered\", \"['32', ['1', '2', '3']]\"]"
+
+ "[\"bookmarks.onChildrenReordered\", \"['32', "
+ "{'childIds':['1', '2', '3']}]\"]"
};
void BrowserEventAutomationProxy::HandleMessageFromChrome() {
diff --git a/chrome/common/common_resources.grd b/chrome/common/common_resources.grd
index e4fc57d..5fc44f4 100644
--- a/chrome/common/common_resources.grd
+++ b/chrome/common/common_resources.grd
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This comment is only here because changes to resources are not picked up
-without changes to the corresponding grd file. fb1 -->
+without changes to the corresponding grd file. rw -->
<grit latest_public_release="0" current_release="1">
<outputs>
<output filename="grit/common_resources.h" type="rc_header">
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index b1513ba..f0cca69 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -31,9 +31,11 @@
"description": "Attempts to connect to other listeners within the extension (listeners may be toolstrips or the extension's background page). This is primarily useful for content scripts connecting to their extension processes. Extensions may connect to content scripts embedded in tabs via <a href='broken'><var>chrome.tabs.connectToTab</var></a>.",
"parameters": [
{
- "name": "name",
- "type": "string",
- "description": "Will be passed into onConnect for extension processes that are listening for the connection event.",
+ "type": "object",
+ "name": "connectInfo",
+ "properties": {
+ "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for extension processes that are listening for the connection event." }
+ },
"optional": true
}
],
@@ -170,9 +172,17 @@
{
"name": "getAll",
"type": "function",
- "description": "Get all windows. If <var>populate</var> is true, each window object will have a <var>tabs</var> property that contains a list of the Tab objects for that window.",
+ "description": "Get all windows.",
"parameters": [
- {"type": "boolean", "name": "populate", "optional": true},
+ {
+ "type": "object",
+ "name": "getInfo",
+ "optional": true,
+ "description": "",
+ "properties": {
+ "populate": {"type": "boolean", "optional": true, "description": "If true, each window object will have a <var>tabs</var> property that contains a list of the Tab objects for that window." }
+ }
+ },
{
"type": "function",
"name": "callback",
@@ -257,7 +267,13 @@
"type": "function",
"description": "",
"parameters": [
- {"type": "integer", "name": "windowId", "minimum": 0}
+ {
+ "type": "object",
+ "name": "createInfo",
+ "properties": {
+ "id": {"type": "integer", "minimum": 0}
+ }
+ }
]
},
{
@@ -318,7 +334,14 @@
"description": "",
"parameters": [
{"type": "integer", "name": "tabId", "optional": true, "minimum": 0},
- {"type": "string", "name": "name", "optional": true}
+ {
+ "type": "object",
+ "name": "connectInfo",
+ "properties": {
+ "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." }
+ },
+ "optional": true
+ }
],
"returns": {
"$ref": "Port"
@@ -765,7 +788,7 @@
],
"events": [
{
- "name": "onAdded",
+ "name": "onCreated",
"type": "function",
"description": "",
"parameters": [
@@ -832,9 +855,11 @@
"parameters": [
{"type": "string", "name": "id"},
{
- "type": "array",
- "name": "childIds",
- "items": { "type": "string" }
+ "type": "object",
+ "name": "reorderInfo",
+ "properties": {
+ "childIds": { "type": "array", "items": { "type": "string" } }
+ }
}
]
}
@@ -849,8 +874,14 @@
"type": "function",
"description": "",
"parameters": [
- {"type": "integer", "name": "height", "minimum": 0},
- {"type": "string", "name": "url", "optional": true},
+ {
+ "type": "object",
+ "name": "expandInfo",
+ "properties": {
+ "height": { "type": "integer", "minimum": 0, "description": "The vertical pixel height required of the toolstrip area." },
+ "url": { "type": "string", "optional": true, "description": "If present, the toolstrip mole will change it's content to the provided url. Otherwise, the current page will just be expanded in size." }
+ }
+ },
{"type": "function", "name": "callback", "optional": true, "parameters": []}
]
},
@@ -859,7 +890,14 @@
"type": "function",
"description": "",
"parameters": [
- {"type": "string", "name": "url", "optional": true},
+ {
+ "type": "object",
+ "name": "collapseInfo",
+ "optional": true,
+ "properties": {
+ "url": { "type": "string", "optional": true, "description": "If present, the toolstrip mole will change it's content to the provided url. Otherwise, the current page will just be collapsed in size." }
+ }
+ },
{"type": "function", "name": "callback", "optional": true, "parameters": []}
]
}
diff --git a/chrome/common/extensions/docs/api_other.html b/chrome/common/extensions/docs/api_other.html
index ed40a76..6b758a8 100755
--- a/chrome/common/extensions/docs/api_other.html
+++ b/chrome/common/extensions/docs/api_other.html
@@ -1,34 +1 @@
-<!DOCTYPE html>
-<!-- This page is a placeholder for generated extensions api doc. Note:
- 1) The <head> information in this page is significant, should be uniform
- across api docs and should be edited only with knowledge of the
- templating mechanism.
- 2) The <body> tag *must* retain id="body"
- 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
- browser, it will be re-generated from the template, json schema and
- authored overview content.
- 4) The <body>.innerHTML is also generated by an offline step so that this
- page may easily be indexed by search engines.
-
- TODO(rafaelw): Abstract this into a "pageshell" that becomes the single
- version of page template shell and the "instance" pages (bookmarks.html,
- etc...) can be generated with a build step.
--->
-<!-- <html> must retain id="template -->
-<html xmlns="http://www.w3.org/1999/xhtml">
- <!-- <head> data is significant and loads the needed libraries and styles -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title jscontent="pageTitle">pageTitle</title>
- <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
- <script type="text/javascript"
- src="../../../third_party/jstemplate/jstemplate_compiled.js">
- </script>
- <script type="text/javascript" src="js/api_page_generator.js"></script>
- <script type="text/javascript" src="js/bootstrap.js"></script>
- </head>
- <!-- <body> content is completely generated. Do not edit, as it will be
- and rewritten. -->
- <body>
- </body>
-</html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Other APIs</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Other APIs</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0" class="leftNavSelected">Other APIs </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2" style="display: none; "> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h2Name</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Other APIs</div> <p jstcache="0"> In addition to the <a href="api_index.html" jstcache="0">chrome.* APIs</a>, extensions can use all the APIs that the browser provides to web pages and apps. If the browser doesn't support an API you want to use, you can bundle additional API libraries into your extension. </p> <p jstcache="0">Here's a sampling of the APIs that extensions can use:</p> <dl jstcache="0"> <dt jstcache="0"><strong jstcache="0"> Standard JavaScript APIs </strong></dt> <dd jstcache="0"> <span class="comment" jstcache="0">[PENDING: define, explain; link to complete list]</span> <!-- Use onclick in your toolbar div to add click behavior. E.g. window.open(someUrl). --></dd> <dt jstcache="0"><strong jstcache="0"> XMLHttpRequest </strong></dt> <dd jstcache="0"> Lets the extension request data from one or more servers. The manifest specifies which domains the extension can send requests to. <span class="comment" jstcache="0">[PENDING: link to doc]</span></dd> <dt jstcache="0"><strong jstcache="0"> WebKit APIs </strong></dt> <dd jstcache="0"> Because Google Chrome is built upon WebKit, your extensions can use WebKit APIs. Especially useful are the experimental CSS features such as filters, animations, and transformations. Here's an example of using WebKit styles to make the UI spin: <pre jstcache="0">&lt;style&gt; div:hover { -webkit-transform: rotate(360deg); -webkit-transition: all sl ease-out; } &lt;/style&gt; </pre> <p class="comment" jstcache="0">[PENDING: link to complete list of webkit apis]</p> </dd> <dt jstcache="0"><strong jstcache="0"> V8 APIs</strong>, such as<strong jstcache="0"> JSON </strong></dt> <dd jstcache="0"> JSON is in V8, so you don't need to include a JSON library to use JSON functions. <span class="comment" jstcache="0">[PENDING: what other APIs are in v8? link to complete list]</span></dd> <dt jstcache="0"> <strong jstcache="0">HTML5</strong> <strong jstcache="0">APIs</strong>, such as <strong jstcache="0">localStorage</strong> and <strong jstcache="0">Web Workers</strong></dt> <dd jstcache="0"> HTML5 is still being defined and implemented, but one crucial feature it will provide is local storage... <!-- localStorage.setItem(&quot;foo&quot;, &quot;bar&quot;); ... localStorage.getItem(&quot;foo&quot;); --> <span class="comment" jstcache="0">[PENDING: mention Web Workers, too. Other important API? link to complete list]</span></dd> <dt jstcache="0"><strong jstcache="0">APIs in bundled libraries</strong></dt> <dd jstcache="0"> If you want to use a library that the browser doesn't provide (for example, jQuery), you can bundle that library's JavaScript files with your extension. Bundled libraries work in extensions just as they would in any other web pages. </dd> </dl> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html
index 3319723..904aa49 100755
--- a/chrome/common/extensions/docs/content_scripts.html
+++ b/chrome/common/extensions/docs/content_scripts.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Content Scripts</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Content Scripts</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0" class="leftNavSelected">Content Scripts</li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Registration</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Match patterns</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Execution environment</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Messaging</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*4"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-4">Communication with the embedding page</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="43">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="45">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Content Scripts</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0">Content Scripts are JavaScript files that run in the context of web pages. By using the standard <a href="http://www.w3.org/TR/DOM-Level-2-HTML/" jstcache="0">Document Object Model</a> (DOM), they can read details of the web pages the browser visits, or make changes to them. </p><p jstcache="0">Some examples of things that content scripts can do include: </p><ul jstcache="0"> <li jstcache="0">Find unlinked URLs in web pages and convert them into hyperlinks </li><li jstcache="0">Increase the font size to make text more legible </li><li jstcache="0">Find and process <a href="http://microformats.org/" jstcache="0">microformat</a> data in the DOM </li></ul> <a name="H2-0" jstcache="0"></a><h2 id="registration" jstcache="0">Registration</h2> <p jstcache="0">Content scripts are registered in an extension's <a href="manifest.html" jstcache="0">manifest.json</a> file, like so: </p><pre jstcache="0">{ "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", <span style="background:yellow; font-weight:bold;" jstcache="0"> "content_scripts": [ { "matches": ["http://www.google.com/*"], "css": ["mystyles.css"], "js": ["jquery.js", "myscript.js"] } ]</span> }</pre> <p jstcache="0">An extension can contain any number of content scripts, and a content script can consist of any number of JavaScript or CSS files. The value of the <code jstcache="0">matches</code> property controls when the content script will run. </p><p jstcache="0">Each content script registered in the manifest can specify the following properties:</p> <table jstcache="0"> <tbody jstcache="0"><tr jstcache="0"> <th jstcache="0">Name</th> <th jstcache="0">Type</th> <th jstcache="0">Description</th> </tr> <tr jstcache="0"> <td jstcache="0">matches</td> <td jstcache="0">array of strings</td> <td jstcache="0">Required. Controls the pages this content script will be injected into. See <a href="#match_patterns" jstcache="0">Match Patterns</a> for more details on the syntax of these strins.</td> </tr> <tr jstcache="0"> <td jstcache="0">js</td> <td jstcache="0"><nobr jstcache="0">array of strings</nobr></td> <td jstcache="0">Optional. The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.</td> </tr> <tr jstcache="0"> <td jstcache="0">css</td> <td jstcache="0">array of strings</td> <td jstcache="0">Optional. The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array, before any DOM is constructed or displayed for the page.</td> </tr> <tr jstcache="0"> <td jstcache="0">run_at</td> <td jstcache="0">string</td> <td jstcache="0">Optional. Controls when the files in <code jstcache="0">js</code> are injected. Can be <code jstcache="0">"document_start"</code> or <code jstcache="0">"document_end"</code>. Defaults to <code jstcache="0">"document_end"</code>. In the case of <code jstcache="0">"document_start"</code>, the files are injected after any files from <code jstcache="0">"css"</code>, but before any other DOM is constructed or any other script is run. In the case of <code jstcache="0">"document_end"</code>, the files are injected after the DOM is complete, but before subresources like images and frames have necessarily loaded.</td> </tr> </tbody></table> <a name="H2-1" jstcache="0"></a><h2 id="match_patterns" jstcache="0">Match patterns</h2> <p class="comment" jstcache="0">TODO</p> <a name="H2-2" jstcache="0"></a><h2 id="execution_environment" jstcache="0">Execution environment</h2> <p jstcache="0">Content scripts execute in a special environment called an <em jstcache="0">isolated world</em>. They have access to the DOM of the page they are injected into, but not to any JavaScript variables or functions created by the page. It looks to each content script as if there is no other JavaScript executing on the page it is running on. The same is true in reverse: JavaScript running on the page cannot call any functions or access any variables defined by content scripts. </p><p jstcache="0">For example, consider this simple page: </p><pre jstcache="0">hello.html =========== &lt;html&gt; &lt;button id="button"&gt;click me&lt;/button&gt; &lt;script&gt; var greeting = "hello!"; function sayGreeting() { alert(greeting); } document.getElementById("button").onclick = sayGreeting; &lt;/script&gt; &lt;/html&gt;</pre> <p jstcache="0">Now, suppose this content script was injected into hello.html: </p><pre jstcache="0">contentscript.js ================== console.log(greeting); // undefined console.log(sayGreeting); // undefined console.log(document.getElementById("button").onclick); // still undefined document.getElementById("button").onclick = function() { alert("hola!"); }</pre> <p jstcache="0">Now, if the button is pressed, you will see both greetings. </p><p jstcache="0">Isolated worlds allow each content script to make changes to its JavaScript environment without worrying about conflicting with the page or with other contnet scripts. For example, a content script could include JQuery v1 and the page could include JQuery v2, and they wouldn't conflict with each other. </p><p jstcache="0">Another important benefit of isolated worlds is that they completely separate the JavaScript on the page from the JavaScript in extensions. This allows us to offer extra functionality to content scripts that should not be accessible from web pages without worrying about web pages accessing it. </p><a name="H2-3" jstcache="0"></a><h2 id="messaging" jstcache="0">Messaging</h2> <p jstcache="0">Content scripts can communicate with their parent extension using message passing. The content script opens a channel to the extension using the <a href="extension.html#connect" jstcache="0">chrome.extension.connect()</a> method and then sends messages back and forth to it. The messages can contain any valid JSON object (null, boolean, number, string, array, or object). </p><p jstcache="0">The parent extension can also open a channel to a content script in a given tab by calling <a href="tabs.html#connect" jstcache="0">chrome.tabs.connect(tabId)</a>. </p><p jstcache="0">When a channel is opened from a content script to an extension, the <a href="extension.html#onConnect" jstcache="0">onConnect</a> event is fired in all views in the extension. Any view can receive the event. The event contains a <a href="extension.html#port" jstcache="0">Port</a> object, which can be used by the extension view to communicate back to the content script. </p><p class="comment" jstcache="0">[TODO: Complete this]</p> <a name="H2-4" jstcache="0"></a><h2 id="hostPageCommuncation" jstcache="0">Communication with the embedding page</h2> <p jstcache="0">Although the execution environments of content scripts and the pages that host them are isolated from each other, they share access to the page's DOM. If the page wishes to communicate with the content script (or with the extension via the content script), it must do so through the shared DOM.</p> <p jstcache="0">An example can be accomplished using custom DOM events and storing data in a known location. Consider: </p> <pre jstcache="0">http://foo.com/example.html ================================ var customEvent = document.createEvent('Event'); customEvent.initEvent('myCustomEvent', true, true); function fireCustomEvent(data) { hidenDiv = document.getElementById('myCustomEventDiv'); hidenDiv.innerHTML = data hidenDiv.dispatchEvent(customEvent); }</pre> <pre jstcache="0">contentscript.js ===================== var port = chrome.extension.connect(); document.getElementById('myCustomEventDiv').addEventListener('myCustomEvent', function() { var eventData = document.getElementById('myCustomEventDiv').innerHTML; port.postMessage({message: "myCustomEvent", values: eventData}); });</pre> <p jstcache="0">In the above example, example.html (which is not a part of the extension) creates a custom event and then can decide to fire the event by setting the event data to a known location in the DOM and then dispatching the custom event. The content script listens for the name of the custom event on the known element and handles the event by inspecting the data of the element, and turning around to post the message to the extension process. In this way the page establishes a line of communication to the extension. The reverse is possible through similar means.</p> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.apiname API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51"> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Content Scripts</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Content Scripts</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0" class="leftNavSelected">Content Scripts</li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Manifest</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Execution environment</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Messaging</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Communication with the embedding page</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*4"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-4">Referring to extension files</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Content Scripts</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0">Content Scripts are JavaScript files that run in the context of web pages. By using the standard <a href="http://www.w3.org/TR/DOM-Level-2-HTML/" jstcache="0">Document Object Model</a> (DOM), they can read details of the web pages the browser visits, or make changes to them. </p><p jstcache="0">Some examples of things that content scripts can do include: </p><ul jstcache="0"> <li jstcache="0">Find unlinked URLs in web pages and convert them into hyperlinks </li><li jstcache="0">Increase the font size to make text more legible </li><li jstcache="0">Find and process <a href="http://microformats.org/" jstcache="0">microformat</a> data in the DOM </li></ul> <a name="H2-0" jstcache="0"></a><h2 id="registration" jstcache="0">Manifest</h2> <p jstcache="0">Content scripts are registered in an extension's <a href="manifest.html" jstcache="0">manifest.json</a> file, like so: </p><pre jstcache="0">{ "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", <span style="background:yellow; font-weight:bold;" jstcache="0"> "content_scripts": [ { "matches": ["http://www.google.com/*"], "css": ["mystyles.css"], "js": ["jquery.js", "myscript.js"] } ]</span> }</pre> <p jstcache="0">An extension can contain any number of content scripts, and a content script can consist of any number of JavaScript or CSS files. The value of the <code jstcache="0">matches</code> property controls when the content script will run. </p><p jstcache="0">Each content script registered in the manifest can specify the following properties:</p> <table jstcache="0"> <tbody jstcache="0"><tr jstcache="0"> <th jstcache="0">Name</th> <th jstcache="0">Type</th> <th jstcache="0">Description</th> </tr> <tr jstcache="0"> <td jstcache="0">matches</td> <td jstcache="0">array of strings</td> <td jstcache="0">Required. Controls the pages this content script will be injected into. See <a href="http://dev.chromium.org/developers/design-documents/extensions/match-patterns" jstcache="0">Match patterns</a> for more details on the syntax of these strings.</td> </tr> <tr jstcache="0"> <td jstcache="0">js</td> <td jstcache="0"><nobr jstcache="0">array of strings</nobr></td> <td jstcache="0">Optional. The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.</td> </tr> <tr jstcache="0"> <td jstcache="0">css</td> <td jstcache="0">array of strings</td> <td jstcache="0">Optional. The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array, before any DOM is constructed or displayed for the page.</td> </tr> <tr jstcache="0"> <td jstcache="0">run_at</td> <td jstcache="0">string</td> <td jstcache="0">Optional. Controls when the files in <code jstcache="0">js</code> are injected. Can be <code jstcache="0">"document_start"</code> or <code jstcache="0">"document_end"</code>. Defaults to <code jstcache="0">"document_end"</code>. In the case of <code jstcache="0">"document_start"</code>, the files are injected after any files from <code jstcache="0">"css"</code>, but before any other DOM is constructed or any other script is run. In the case of <code jstcache="0">"document_end"</code>, the files are injected after the DOM is complete, but before subresources like images and frames have necessarily loaded.</td> </tr> </tbody></table> <a name="H2-1" jstcache="0"></a><h2 id="execution_environment" jstcache="0">Execution environment</h2> <p jstcache="0">Content scripts execute in a special environment called an <em jstcache="0">isolated world</em>. They have access to the DOM of the page they are injected into, but not to any JavaScript variables or functions created by the page. It looks to each content script as if there is no other JavaScript executing on the page it is running on. The same is true in reverse: JavaScript running on the page cannot call any functions or access any variables defined by content scripts. </p><p jstcache="0">For example, consider this simple page: </p><pre jstcache="0">hello.html =========== &lt;html&gt; &lt;button id="button"&gt;click me&lt;/button&gt; &lt;script&gt; var greeting = "hello!"; function sayGreeting() { alert(greeting); } document.getElementById("button").onclick = sayGreeting; &lt;/script&gt; &lt;/html&gt;</pre> <p jstcache="0">Now, suppose this content script was injected into hello.html: </p><pre jstcache="0">contentscript.js ================== console.log(greeting); // undefined console.log(sayGreeting); // undefined console.log(document.getElementById("button").onclick); // still undefined document.getElementById("button").onclick = function() { alert("hola!"); }</pre> <p jstcache="0">Now, if the button is pressed, you will see both greetings. </p><p jstcache="0">Isolated worlds allow each content script to make changes to its JavaScript environment without worrying about conflicting with the page or with other contnet scripts. For example, a content script could include JQuery v1 and the page could include JQuery v2, and they wouldn't conflict with each other. </p><p jstcache="0">Another important benefit of isolated worlds is that they completely separate the JavaScript on the page from the JavaScript in extensions. This allows us to offer extra functionality to content scripts that should not be accessible from web pages without worrying about web pages accessing it. </p><a name="H2-2" jstcache="0"></a><h2 id="messaging" jstcache="0">Messaging</h2> <p jstcache="0">Content scripts can communicate with their parent extension using message passing. The content script opens a channel to the extension using the <a href="extension.html#connect" jstcache="0">chrome.extension.connect()</a> method and then sends messages back and forth to it. The messages can contain any valid JSON object (null, boolean, number, string, array, or object). </p><p jstcache="0">The parent extension can also open a channel to a content script in a given tab by calling <a href="tabs.html#connect" jstcache="0">chrome.tabs.connect(tabId)</a>. </p><p jstcache="0">When a channel is opened from a content script to an extension, the <a href="extension.html#onConnect" jstcache="0">onConnect</a> event is fired in all views in the extension. Any view can receive the event. The event contains a <a href="extension.html#port" jstcache="0">Port</a> object, which can be used by the extension view to communicate back to the content script. </p><p class="comment" jstcache="0">[TODO: Complete this]</p> <a name="H2-3" jstcache="0"></a><h2 id="hostPageCommuncation" jstcache="0">Communication with the embedding page</h2> <p jstcache="0">Although the execution environments of content scripts and the pages that host them are isolated from each other, they share access to the page's DOM. If the page wishes to communicate with the content script (or with the extension via the content script), it must do so through the shared DOM.</p> <p jstcache="0">An example can be accomplished using custom DOM events and storing data in a known location. Consider: </p> <pre jstcache="0">http://foo.com/example.html ================================ var customEvent = document.createEvent('Event'); customEvent.initEvent('myCustomEvent', true, true); function fireCustomEvent(data) { hidenDiv = document.getElementById('myCustomEventDiv'); hidenDiv.innerHTML = data hidenDiv.dispatchEvent(customEvent); }</pre> <pre jstcache="0">contentscript.js ===================== var port = chrome.extension.connect(); document.getElementById('myCustomEventDiv').addEventListener('myCustomEvent', function() { var eventData = document.getElementById('myCustomEventDiv').innerHTML; port.postMessage({message: "myCustomEvent", values: eventData}); });</pre> <p jstcache="0">In the above example, example.html (which is not a part of the extension) creates a custom event and then can decide to fire the event by setting the event data to a known location in the DOM and then dispatching the custom event. The content script listens for the name of the custom event on the known element and handles the event by inspecting the data of the element, and turning around to post the message to the extension process. In this way the page establishes a line of communication to the extension. The reverse is possible through similar means.</p> <a name="H2-4" jstcache="0"></a><h2 id="extensionFiles" jstcache="0">Referring to extension files</h2> <p jstcache="0"> Get the URL of an extension's file using <code jstcache="0">chrome.extension.getURL()</code>. You can use the result just like you would any other URL, as the following code shows. </p> <pre jstcache="0"><em jstcache="0">//Code for displaying &lt;extensionDir&gt;/images/myimage.png:</em> var imgURL = <b jstcache="0">chrome.extension.getURL("images/myimage.png")</b>; document.getElementById("someImage").src = imgURL; </pre> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html
index 9cb3e88..560fe91 100755
--- a/chrome/common/extensions/docs/getstarted.html
+++ b/chrome/common/extensions/docs/getstarted.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Tutorial: Getting Started</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Tutorial: Getting Started</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0" class="leftNavSelected">Getting Started </li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Get your browser ready</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Create and load an extension</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Add code to the extension</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*3"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Summary</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="43">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="45">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Tutorial: Getting Started</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> This tutorial walks you through creating a simple extension. To complete this tutorial, you must have Windows. (Linux and Mac don't yet support extensions.) </p> <a name="H2-0" jstcache="0"></a><h2 id="browser" jstcache="0">Get your browser ready</h2> <p jstcache="0"> To develop extensions for Google Chrome, you need to set up your browser: </p> <ol jstcache="0"> <li jstcache="0"><a href="http://dev.chromium.org/getting-involved/dev-channel" jstcache="0">Subscribe to the Dev channel</a> of Google Chrome for Windows. </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/creating-and-using-profiles" jstcache="0">Create a separate profile</a> for testing <em jstcache="0">(optional but highly recommended)</em>. Having a testing profile means that you can use Google Chrome (with your default profile) for everyday browsing, even if your extension has horrible bugs.</li> </ol> <a name="H2-1" jstcache="0"></a><h2 id="load" jstcache="0">Create and load an extension</h2> <p jstcache="0"> In this section, you'll write a <em jstcache="0">toolstrip</em> — an extension that puts a bit of UI into the <em jstcache="0">toolbar</em> at the bottom of the Google Chrome window. </p> <ol jstcache="0"> <li jstcache="0"> Create a folder somewhere on your computer to contain your extension's code. We'll assume the folder is located at <strong jstcache="0"><code jstcache="0">c:\myext</code></strong>, but it can be anywhere. </li> <li jstcache="0"> Inside your extension's folder, create a text file called <strong jstcache="0"><code jstcache="0">manifest.json</code></strong>, and put this in it: <pre jstcache="0">{ "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", "toolstrips": [ "my_toolstrip.html" ] }</pre> </li> <li jstcache="0"> In the same folder, create a text file called <strong jstcache="0"><code jstcache="0">my_toolstrip.html</code></strong>, and put this in it: <pre jstcache="0">&lt;div class="toolstrip-button"&gt; &lt;span&gt;Hello, World!&lt;/span&gt; &lt;/div&gt;</pre> </li> <li jstcache="0"> Load the extension: <ol type="a" jstcache="0"> <li jstcache="0"> Change the shortcut that you use to start the browser (or create a new one) so that it has the <code jstcache="0">--load-extension</code> flag. For example, if your extension is at <code jstcache="0">c:\myext</code>, your shortcut might look something like this: <pre jstcache="0">chrome.exe <span class="newCode" jstcache="0">--load-extension="c:\myext"</span></pre> </li> <li jstcache="0">Exit Google Chrome. If you have a separate profile for testing, you only need to exit the browser instances that use the testing profile. </li> <li jstcache="0">Double-click the shortcut to start the browser.</li> </ol> <p jstcache="0"> <b jstcache="0">Note:</b> To run already-packaged extensions the browser must be started with the <code jstcache="0">--enable-extensions</code> or <code jstcache="0">--load-extension</code> flag. An exception: themes run in the Dev channel version of Google Chrome, no flags required. For details on changing shortcut properties, see <a href="http://dev.chromium.org/developers/creating-and-using-profiles" jstcache="0">Creating and Using Profiles</a>. </p> </li> </ol> <p jstcache="0"> You should see the UI for your extension at the bottom left of the browser, looking something like this: </p> <table class="imagelayout" jstcache="0"> <tbody jstcache="0"> <tr class="images" jstcache="0"> <td width="33%" jstcache="0"><img src="images/hw-1.gif" alt="" jstcache="0"></td> <td width="33%" jstcache="0"><img src="images/hw-2.gif" alt="" jstcache="0"></td> <td width="33%" jstcache="0"><img src="images/hw-3.gif" alt="" jstcache="0"></td> </tr> <tr jstcache="0"> <td width="33%" jstcache="0"> default appearance</td> <td width="33%" jstcache="0"> initial onhover appearance</td> <td width="33%" jstcache="0"> final onhover appearance</td> </tr> </tbody> </table> <p jstcache="0"> Your extension's button is automatically styled to look like it belongs in the browser. If you put the cursor over the button, the button gets a nice, rounded edge, just like the buttons in the bookmark bar. After a while, a tooltip comes up, identifying the extension. </p> <p jstcache="0"> [PENDING: troubleshooting info should go here. what are symptoms of common typos, including misnamed files? what are the symptoms if you don't have the dev channel?] </p> <a name="H2-2" jstcache="0"></a><h2 id="code" jstcache="0">Add code to the extension</h2> <p jstcache="0"> In this step, you'll make your extension <em jstcache="0">do</em> something besides just look good. </p> <ol jstcache="0"> <li jstcache="0"> <p jstcache="0"> Inside your extension's folder, create a text file called <strong jstcache="0"><code jstcache="0">hello_world.html</code></strong>, and add the following code to it:</p> <blockquote jstcache="0"> <a href="samples/hello_world.txt" jstcache="0">CSS and JavaScript code for hello_world</a></blockquote> </li> <li jstcache="0"> <p jstcache="0"> Edit <code jstcache="0">my_toolstrip.html</code>, so that it has the following code: </p> <pre jstcache="0">&lt;div class="toolstrip-button"<span class="newCode" jstcache="0"> onclick="window.open('hello_world.html')"</span>&gt; &lt;span&gt;Hello, World!&lt;/span&gt; &lt;/div&gt;</pre> </li> <li jstcache="0"> Restart the browser to load the new version of the extension.</li> <li jstcache="0">Click the button. A window should come up that displays <code jstcache="0">hello_world.html</code>. </li> </ol> <p jstcache="0"> It should look something like this:</p> <img src="images/hello_world-page.gif" alt="a window with a grid of images related to HELLO WORLD" jstcache="0"> <p jstcache="0"> If you don't see that page, try the instructions again, following them exactly. Don't try loading an HTML file that isn't in the extension's folder — it won't work! </p> <a name="H2-3" jstcache="0"></a><h2 id="summary" jstcache="0">Summary</h2> <p jstcache="0"> [PENDING: Summarize what we did, what it means, what else we would've done if this were a real extension (e.g. package it), and where to find more information. Suggest where to go next.]</p> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.apiname API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51"> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Tutorial: Getting Started (Hello, World!)</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Tutorial: Getting Started (Hello, World!)</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0" class="leftNavSelected">Getting Started </li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Get your browser ready</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Create and load an extension</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Add code to the extension</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*3"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Now what?</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Tutorial: Getting Started (Hello, World!)</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> This tutorial walks you through creating a simple extension. To complete this tutorial, you must have Windows. (Linux and Mac don't yet support extensions.) </p> <a name="H2-0" jstcache="0"></a><h2 id="browser" jstcache="0">Get your browser ready</h2> <p jstcache="0"> To develop extensions for Google Chrome, you need to set up your browser: </p> <ol jstcache="0"> <li jstcache="0"><a href="http://dev.chromium.org/getting-involved/dev-channel" jstcache="0">Subscribe to the Dev channel</a> of Google Chrome for Windows. </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/creating-and-using-profiles" jstcache="0">Create a separate profile</a> for testing <em jstcache="0">(optional but highly recommended)</em>. Having a testing profile means that you can use Google Chrome (with your default profile) for everyday browsing, even if your extension has horrible bugs.</li> </ol> <a name="H2-1" jstcache="0"></a><h2 id="load" jstcache="0">Create and load an extension</h2> <p jstcache="0"> In this section, you'll write a <em jstcache="0">toolstrip</em> — an extension that puts a bit of UI into the <em jstcache="0">toolbar</em> at the bottom of the Google Chrome window. </p> <ol jstcache="0"> <li jstcache="0"> Create a folder somewhere on your computer to contain your extension's code. We'll assume the folder is located at <strong jstcache="0"><code jstcache="0">c:\myext</code></strong>, but it can be anywhere. </li> <li jstcache="0"> Inside your extension's folder, create a text file called <strong jstcache="0"><code jstcache="0">manifest.json</code></strong>, and put this in it: <pre jstcache="0">{ "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", "toolstrips": [ "my_toolstrip.html" ] }</pre> </li> <li jstcache="0"> In the same folder, create a text file called <strong jstcache="0"><code jstcache="0">my_toolstrip.html</code></strong>, and put this in it: <pre jstcache="0">&lt;div class="toolstrip-button"&gt; &lt;span&gt;Hello, World!&lt;/span&gt; &lt;/div&gt;</pre> </li> <li jstcache="0"> Load the extension: <ol type="a" jstcache="0"> <li jstcache="0"> Change the shortcut that you use to start the browser (or create a new one) so that it has the <code jstcache="0">--load-extension</code> flag. For example, if your extension is at <code jstcache="0">c:\myext</code>, your shortcut might look something like this: <pre jstcache="0">chrome.exe <b jstcache="0">--load-extension="c:\myext"</b></pre> </li> <li jstcache="0">Exit Google Chrome. If you have a separate profile for testing, you only need to exit the browser instances that use the testing profile. </li> <li jstcache="0">Double-click the shortcut to start the browser.</li> </ol> <p jstcache="0"> <b jstcache="0">Note:</b> To run already-packaged extensions the browser must be started with the <code jstcache="0">--enable-extensions</code> or <code jstcache="0">--load-extension</code> flag. An exception: themes run in the Dev channel version of Google Chrome, no flags required. For details on changing shortcut properties, see <a href="http://dev.chromium.org/developers/creating-and-using-profiles" jstcache="0">Creating and Using Profiles</a>. </p> </li> </ol> <p jstcache="0"> You should see the UI for your extension at the bottom left of the browser, looking something like this: </p> <table class="imagelayout" jstcache="0"> <tbody jstcache="0"> <tr class="images" jstcache="0"> <td width="33%" jstcache="0"><img src="images/hw-1.gif" alt="" jstcache="0"></td> <td width="33%" jstcache="0"><img src="images/hw-2.gif" alt="" jstcache="0"></td> <td width="33%" jstcache="0"><img src="images/hw-3.gif" alt="" jstcache="0"></td> </tr> <tr jstcache="0"> <td width="33%" jstcache="0"> default appearance</td> <td width="33%" jstcache="0"> initial onhover appearance</td> <td width="33%" jstcache="0"> final onhover appearance</td> </tr> </tbody> </table> <p jstcache="0"> Your extension's button is automatically styled to look like it belongs in the browser. If you put the cursor over the button, the button gets a nice, rounded edge, just like the buttons in the bookmark bar. After a while, a tooltip comes up, identifying the extension. </p> <p jstcache="0"> [PENDING: troubleshooting info should go here. what are symptoms of common typos, including misnamed files? what are the symptoms if you don't have the dev channel?] </p> <a name="H2-2" jstcache="0"></a><h2 id="code" jstcache="0">Add code to the extension</h2> <p jstcache="0"> In this step, you'll make your extension <em jstcache="0">do</em> something besides just look good. </p> <ol jstcache="0"> <li jstcache="0"> <p jstcache="0"> Inside your extension's folder, create a text file called <strong jstcache="0"><code jstcache="0">hello_world.html</code></strong>, and add the following code to it:</p> <blockquote jstcache="0"> <a href="samples/hello_world.txt" jstcache="0">CSS and JavaScript code for hello_world</a></blockquote> </li> <li jstcache="0"> <p jstcache="0"> Edit <code jstcache="0">my_toolstrip.html</code>, so that it has the following code: </p> <pre jstcache="0">&lt;div class="toolstrip-button"<b jstcache="0"> onclick="window.open('hello_world.html')"</b>&gt; &lt;span&gt;Hello, World!&lt;/span&gt; &lt;/div&gt;</pre> </li> <li jstcache="0"> Restart the browser to load the new version of the extension.</li> <li jstcache="0">Click the button. A window should come up that displays <code jstcache="0">hello_world.html</code>. </li> </ol> <p jstcache="0"> It should look something like this:</p> <img src="images/hello_world-page.gif" alt="a window with a grid of images related to HELLO WORLD" jstcache="0"> <p jstcache="0"> If you don't see that page, try the instructions again, following them exactly. Don't try loading an HTML file that isn't in the extension's folder — it won't work! </p> <a name="H2-3" jstcache="0"></a><h2 id="summary" jstcache="0">Now what?</h2> <p jstcache="0"> [PENDING: Summarize what we did, what it means, what else we would've done if this were a real extension (e.g. package it), and where to find more information.]</p> <ul jstcache="0"> <li jstcache="0"> Subscribe to <a href="http://groups.google.com/group/chromium-extensions/subscribe" jstcache="0">chromium-extensions</a> to keep up to date with the latest news </li> <li jstcache="0"> Learn how to debug your extension by following the <a href="tut_debugging.html" jstcache="0">debugging tutorial</a> </li> <li jstcache="0"> Look at some <a href="http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/samples" jstcache="0">sample extensions</a> </li> <li jstcache="0"> Learn more about <a href="toolstrips.html" jstcache="0">toolstrips</a> </li> <li jstcache="0"> <a href="packaging.html" jstcache="0">Package</a> your extension into a <code jstcache="0">.crx</code> file so you can share it with your friends </li> </ul> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/overview.html b/chrome/common/extensions/docs/overview.html
index 973e570..3ebad1b 100755
--- a/chrome/common/extensions/docs/overview.html
+++ b/chrome/common/extensions/docs/overview.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Overview</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Overview</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0" class="leftNavSelected">Overview </li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2" style="display: none; "> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h2Name</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="43">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="45">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><p jstcache="0"> This page should perhaps be renamed from "overview" to "concepts". In any case, what I'd like to cover here is the conceptual underpinning of extensions, such as: </p><ul jstcache="0"> <li jstcache="0">Zip file of web pages </li><li jstcache="0">All resources accessible with a URL scheme </li><li jstcache="0">How IDs are generated </li><li jstcache="0">The manifest </li><li jstcache="0">The background page, how extensions are typically structured </li><li jstcache="0">Process model </li><li jstcache="0">Content scripts (lightweight, link off to other page for details) </li><li jstcache="0">Asynchronous APIs </li><li jstcache="0">Extension IDs, how they are generated </li><li jstcache="0">How packaging works at a high level (lightweight, link off to other page for details) </li></ul></div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.apiname API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51"> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Overview</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Overview</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0" class="leftNavSelected">Overview </li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">The basics</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Files</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-2">Referring to files</a> </li><li jsselect="$this.children" jstcache="22" jsinstance="*1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-3">The manifest file</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-4">Architecture</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-5">The background page</a> </li><li jsselect="$this.children" jstcache="22" jsinstance="*1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-6">Content scripts</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-7">Communication </a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*4"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-8"> Summary </a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Overview</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> Please read this page; it has vital information about the extension architecture. If you get bored or restless, take a break! We suggest bouncing between this page and tutorials such as <a href="getstarted.html" jstcache="0">Getting Started</a> and <a href="tut_debugging.html" jstcache="0">Debugging</a>. </p> <a name="H2-0" jstcache="0"></a><h2 id="what" jstcache="0">The basics</h2> <p jstcache="0"> An extension is a zipped bundle of files — HTML, CSS, JavaScript, images, and anything else you need — that adds functionality to the Google Chrome browser. Because an extension is just a special kind of web page, it can use all the APIs that the browser provides to web pages and apps, from XMLHttpRequest to JSON to localStorage. </p> <p jstcache="0"> Extensions can add UI to Google Chrome, in the form of <a href="toolstrip.html" jstcache="0">toolstrips</a> (toolbar additions) and <a href="pageActions.html" jstcache="0">page actions</a> (clickable badges in the address bar). Extensions can also interact programmatically with browser features such as <a href="bookmarks.html" jstcache="0">bookmarks</a> and <a href="tabs.html" jstcache="0">tabs</a>. </p> <p jstcache="0"> To find a complete list of extension features, with implementation details for each one, see the <a href="devguide.html" jstcache="0">Developer's Guide</a>. </p> <a name="H2-1" jstcache="0"></a><h2 id="files" jstcache="0">Files</h2> <p jstcache="0"> Each extension has the following files: <!-- PENDING: This could use a picture --> </p> <ul jstcache="0"> <li jstcache="0">A <b jstcache="0">manifest file</b></li> <li jstcache="0">One or more <b jstcache="0">HTML files</b> (unless the extension is a theme)</li> <li jstcache="0"><em jstcache="0">Optional:</em> One or more <b jstcache="0">JavaScript files</b></li> <li jstcache="0"><em jstcache="0">Optional:</em> Any other files your extension needs — for example, image files</li> </ul> <p jstcache="0"> While you're working on your extension, you put all these files into a single folder. When you distribute your extension, the contents of the folder are packaged into a special zipfile that has a <code jstcache="0">.crx</code> suffix, as described in <a href="packaging.html" jstcache="0">Packaging</a>. </p> <a name="H3-2" jstcache="0"></a><h3 jstcache="0">Referring to files</h3> <p jstcache="0"> You can put any file you like into an extension, but how do you use it? Usually, you can refer to the file using a relative URL, just as you would in an ordinary HTML page. Here's an example of referring to a file named <code jstcache="0">myimage.png</code> that's in a subdirectory named <code jstcache="0">images</code>. </p> <pre jstcache="0">&lt;img <b jstcache="0">src="images/myimage.png"</b> style="width:auto; height:auto"&gt; </pre> <p jstcache="0"> As you might notice while you use the Google Chrome debugger, every file in an extension is also accessible by an absolute URL like this: </p> <blockquote jstcache="0"> <b jstcache="0">chrome-extension://</b><em jstcache="0">&lt;extensionID&gt;</em><b jstcache="0">/</b><em jstcache="0">&lt;pathToFile&gt;</em> </blockquote> <p jstcache="0"> In that URL, the <em jstcache="0">&lt;extensionID&gt;</em> is a unique identifier that the extension system generates for each extension. You can see the IDs for all your loaded extensions by going to the URL <b jstcache="0">chrome://extensions/</b>. The <em jstcache="0">&lt;pathToFile&gt;</em> is the location of the file under the extension's top directory; it's the same as the relative URL. </p> <p class="comment" jstcache="0"> [QUESTION TO REVIEWERS: Is this section too big/detailed? It seems a little weird to mention absolute URLs with mentioning getURL and when you'd need it. What's the motivation for covering absolute URLs? Is the debugger the place you're most likely to see them?] </p> <p jstcache="0"> For example, assume your extension has the ID <b jstcache="0">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</b> and the files shown in the following figure: </p> <pre jstcache="0"><span class="comment" jstcache="0">[PENDING: convert this into a figure]</span> toolstrip.html styles.css images: myimage.png ... other: more.html morestyles.css ... </pre> <p jstcache="0"> Here's a table that shows the relative and absolute URLs of these files. Keep in mind that the relative URL is the same no matter where you're using it — the relative URL of <code jstcache="0">myimage.png</code> is <b jstcache="0">images/myimage.png</b>, no matter whether it's being used by <code jstcache="0">toolstrip.html</code> or <code jstcache="0">other/more.html</code>. </p> <table jstcache="0"> <tbody jstcache="0"><tr jstcache="0"> <th jstcache="0"> File </th> <th jstcache="0"> Relative URL </th> <th jstcache="0"> Absolute URL </th> </tr> <tr jstcache="0"> <td jstcache="0"> toolstrip.html </td> <td jstcache="0"> toolstrip.html </td> <td jstcache="0"> chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/toolstrip.html </td> </tr> <tr jstcache="0"> <td jstcache="0"> styles.css </td> <td jstcache="0"> styles.css </td> <td jstcache="0"> chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/styles.css </td> </tr> <tr jstcache="0"> <td jstcache="0"> myimage.png </td> <td jstcache="0"> images/myimage.png </td> <td jstcache="0"> chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/images/myimage.png </td> </tr> <tr jstcache="0"> <td jstcache="0"> more.html </td> <td jstcache="0"> other/more.html </td> <td jstcache="0"> chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/other/more.html </td> </tr> <tr jstcache="0"> <td jstcache="0"> morestyles.css </td> <td jstcache="0"> other/morestyles.css </td> <td jstcache="0"> chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/other/morestyles.css </td> </tr> </tbody></table> <p class="comment" jstcache="0"> [PENDING: Mention/reflect/link to <a href="http://dev.chromium.org/developers/design-documents/extensions/i18n" jstcache="0">internationalization</a>] </p> <a name="H3-3" jstcache="0"></a><h3 jstcache="0">The manifest file</h3> <p jstcache="0"> The manifest file, called <code jstcache="0">manifest.json</code>, gives information about the extension, such as the most important files and the capabilities that the extension might use. Here's a typical manifest file for a toolstrip that uses information from google.com: </p> <pre jstcache="0">{ "name": "My Extension", "version": "2.1", "description": "Gets information from Google.", "update_url": "http://example.com/mytestextension/updates.xml", "permissions": ["http://*.google.com/", "https://*.google.com/"], "toolstrips": ["my_toolstrip.html"] }</pre> <p jstcache="0"> For details, see <a href="manifest.html" jstcache="0">Manifest Files</a>. </p> <a name="H2-4" jstcache="0"></a><h2 id="arch" jstcache="0">Architecture</h2> <p jstcache="0"> The following pictures shows the web pages associated with a typical extension (in this case, a simple toolstrip). The first figure shows what an extension might look like when there's a single browser window. </p> <p class="comment" jstcache="0"> [PENDING: image goes here] </p> <p jstcache="0"> The next figure shows that all the code in the extension's main HTML file is duplicated each time you create a new window. In other words, each window has its own widgets for the extension, which means each window adds another web page for that extension. </p> <p class="comment" jstcache="0"> [PENDING: image goes here] </p> <p jstcache="0"> To more easily coordinate all these web pages and to avoid duplication, you should design your extension so that most of the code — especially the state of the extension — is in a <em jstcache="0">background page</em>, as shown in the following figure. </p> <p class="comment" jstcache="0"> [PENDING: image goes here.] </p> <a name="H3-5" jstcache="0"></a><h3 id="background" jstcache="0">The background page</h3> <p jstcache="0"> Any non-trivial extension can (and probably should) have a background page. The background page is an invisible page where you put the main logic of the extension. The extension's other pages should have only the code that's necessary to show the state of the extension and to get input from the user.</p> <p jstcache="0"> An extension's background page exists before any of the extension's other pages exist. It continues to exist as long as the browser is running and the extension is installed, even if other pages and windows go away. </p> <p jstcache="0"> Your extension's UI — its toolstrips, page actions, and so on — should be dumb views. When the view needs some state, it should request it from the background page. When the background page notices some state change, it should update all the views. </p> <p jstcache="0"> For more information, see <a href="background_pages.html" jstcache="0">Background Pages</a>. </p> <a name="H3-6" jstcache="0"></a><h3 id="contentScripts" jstcache="0">Content scripts</h3> <p jstcache="0"> If you want your extension to interact with web pages, you need a content script. Content scripts are JavaScript files that run in the context of web pages. By using the standard Document Object Model (DOM), they can read details of the web pages the browser visits, and they can make changes to the pages. </p> <p class="comment" jstcache="0"> [PENDING: add an architectural figure here, showing the extension's pages, a web page, and the content script interacting with the web page. explain the figure.] </p> <p jstcache="0"> For more information, see <a href="content_scripts.html" jstcache="0">Content Scripts</a>. </p> <a name="H2-7" jstcache="0"></a><h2 jstcache="0">Communication </h2> <p jstcache="0"> Two kinds of communication happen within an extension: </p> <ul jstcache="0"> <li jstcache="0"> Communication <b jstcache="0">between pages</b> in the extension. <br jstcache="0"> For example, sometimes the background page needs to update all the UI pages to reflect a change in the extension's state. </li> <li jstcache="0"> Communication <b jstcache="0">between content scripts and the extension</b>. <br jstcache="0"> For example, <span class="comment" jstcache="0">[PENDING: example goes here]</span>. See <a href="content_scripts.html" jstcache="0">Content Scripts</a> for information about this type of communication. </li> </ul> <p jstcache="0"> Here are some keys to communication between an extension's pages: </p> <ul jstcache="0"> <li jstcache="0"> All the extension's pages execute in same process, on the same thread. </li> <li jstcache="0"> Extension pages can use <a href="extension.html" jstcache="0"><code jstcache="0">chrome.extension</code></a> methods such as <code jstcache="0">getViews()</code>, <code jstcache="0">getBackgroundPage()</code>, and <code jstcache="0">getToolstrips()</code> to get access to the extension's pages. </li> <li jstcache="0"> Once you have references to an extension's pages, you can manipulate the DOM for each page. </li> <li jstcache="0"> You can also make direct function calls to the pages, as shown in the following example. </li> </ul> <p jstcache="0"> Here's an example of communication between toolstrips and the background page. </p> <pre jstcache="0">//In background_page.html: function updateUI(checked) { var toolstrips = chrome.extension.getToolstrips(); for (var i in toolstrips) { if (toolstrips[i].enableCheckbox) toolstrips[i].enableCheckbox(checked); } } //In toolstrip.html: function enableCheckbox(checked) { var cb = document.getElementById('checkbox'); cb.checked = checked; } </pre> <p jstcache="0"> A good summary of communication mechanisms is at <a href="http://www.chromeplugins.org/google/plugins-development/communication-7883.html" jstcache="0">http://www.chromeplugins.org/google/plugins-development/communication-7883.html</a>. </p> <a name="H2-8" jstcache="0"></a><h2 jstcache="0"> Summary </h2> <p jstcache="0"> [ PENDING: wrap it up. suggest where to go next. Probably: <a href="getstarted.html" jstcache="0">Getting Started</a>, <a href="tut_debugging.html" jstcache="0">Debugging</a>, <a href="devguide.html" jstcache="0">Developer's Guide</a>. ] </p> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/packaging.html b/chrome/common/extensions/docs/packaging.html
index 8c99145..8ee7d5d 100755
--- a/chrome/common/extensions/docs/packaging.html
+++ b/chrome/common/extensions/docs/packaging.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Packaging</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Packaging</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0" class="leftNavSelected">Packaging</li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Creating a package</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-1">Finding the path to Chrome</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Updating a package</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Tips and Tricks</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="43">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="45">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Packaging</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> Extensions are packaged as signed zip files with the file extension "crx" (for example, <code jstcache="0">myextension.crx</code>). Each extension has its own unique key pair. The public key is used as the unique identifier for the extension. The private key is kept private and used to sign each version of the extension. </p> <!-- [PENDING: Perhaps mention that once the gallery is up, creating and updating a package will be much easier. Also refer to instructions on submitting an extension for inclusion in the gallery.] --> <a name="H2-0" jstcache="0"></a><h2 jstcache="0">Creating a package</h2> <p jstcache="0">To package an extension:</p> <ol jstcache="0"> <li jstcache="0">Close all your Chrome windows</li> <li jstcache="0">Execute Chrome, using the <code jstcache="0">--pack-extension</code> option to specify the path to the extension's folder: <pre jstcache="0">chrome.exe --pack-extension=<em jstcache="0">ext-folder-path</em></pre> </li> </ol> <p jstcache="0">The packager creates two files: a <code jstcache="0">.crx</code> file, which is the actual extension that can be installed, and a <code jstcache="0">.pem</code> file, which contains the private key. </p> <p jstcache="0"> <b jstcache="0">Do not lose the private key!</b> Keep the <code jstcache="0">.pem</code> file secret and in a safe place. You'll need it later if you want to do any of the following: </p> <ul jstcache="0"> <li jstcache="0"><a href="#update" jstcache="0">Update</a> the extension</li> <li jstcache="0">Import the extension into the extensions gallery, once the gallery becomes available</li> </ul> <p jstcache="0"> If the extension is successfully packaged, you'll see a dialog like this that tells you where to find the <code jstcache="0">.crx</code> and <code jstcache="0">.pem</code> files:</p> <p jstcache="0"></p> <img src="images/create-package.png" jstcache="0"> <a name="H3-1" jstcache="0"></a><h3 jstcache="0">Finding the path to Chrome</h3> <p jstcache="0"> If <code jstcache="0">chrome.exe</code> isn't already in your path, you need to specify the complete path to it. Here's how: </p> <ul jstcache="0"> <li jstcache="0"> In Windows XP, right-click your Google Chrome shortcut, choose <b jstcache="0">Properties &gt; Shortcut</b>, and then choose <b jstcache="0">Find Target</b>. </li> <li jstcache="0"> In Vista, right-click your Google Chrome shortcut and select <b jstcache="0">Open File Location</b>. </li> </ul> <a name="H2-2" jstcache="0"></a><h2 id="update" jstcache="0">Updating a package</h2> <p jstcache="0">To create an updated version of your extension:</p> <ol jstcache="0"> <li jstcache="0">Increase the version number in <code jstcache="0">manifest.json</code>.</li> <li jstcache="0">Close all your Chrome windows.</li> <li jstcache="0">Execute Chrome, using the <code jstcache="0">--pack-extension</code> and <code jstcache="0">--pack-extension-key</code> options. The value of the key option should be the path to the already generated <code jstcache="0">.pem</code> file for this extension. <pre jstcache="0">chrome.exe --pack-extension=<em jstcache="0">ext-folder-path</em> --pack-extension-key=<em jstcache="0">ext-key-path</em></pre> </li> </ol> <p jstcache="0">If the updated extension is successfully packaged, you'll see a dialog like this:</p> <img src="images/package-success.png" jstcache="0"> <a name="H2-3" jstcache="0"></a><h2 jstcache="0">Tips and Tricks</h2> <ul jstcache="0"> <li jstcache="0">In build 3.0.195 and later, you can use the <code jstcache="0">--no-message-box</code> command line flag to suppress the dialog. This is useful if you're packing extensions in non-interactive scripts.</li> </ul> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.apiname API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51"> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Packaging</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Packaging</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0" class="leftNavSelected">Packaging</li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Creating a package</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-1">Finding the path to Chrome</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Updating a package</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-3">Tips and tricks</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Packaging</div> <div id="pageData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> Extensions are packaged as signed zip files with the file extension "crx" (for example, <code jstcache="0">myextension.crx</code>). Each extension has its own unique key pair. The public key is used as the unique identifier for the extension. The private key is kept private and used to sign each version of the extension. </p> <!-- [PENDING: Perhaps mention that once the gallery is up, creating and updating a package will be much easier. Also refer to instructions on submitting an extension for inclusion in the gallery.] --> <a name="H2-0" jstcache="0"></a><h2 jstcache="0">Creating a package</h2> <p jstcache="0">To package an extension:</p> <ol jstcache="0"> <li jstcache="0">Close all your Chrome windows</li> <li jstcache="0">Execute Chrome, using the <code jstcache="0">--pack-extension</code> option to specify the path to the extension's folder: <pre jstcache="0">chrome.exe --pack-extension=<em jstcache="0">ext-folder-path</em></pre> </li> </ol> <p jstcache="0">The packager creates two files: a <code jstcache="0">.crx</code> file, which is the actual extension that can be installed, and a <code jstcache="0">.pem</code> file, which contains the private key. </p> <p jstcache="0"> <b jstcache="0">Do not lose the private key!</b> Keep the <code jstcache="0">.pem</code> file secret and in a safe place. You'll need it later if you want to do any of the following: </p> <ul jstcache="0"> <li jstcache="0"><a href="#update" jstcache="0">Update</a> the extension</li> <li jstcache="0">Import the extension into the extensions gallery, once the gallery becomes available</li> </ul> <p jstcache="0"> If the extension is successfully packaged, you'll see a dialog like this that tells you where to find the <code jstcache="0">.crx</code> and <code jstcache="0">.pem</code> files:</p> <p jstcache="0"></p> <img src="images/create-package.png" jstcache="0"> <a name="H3-1" jstcache="0"></a><h3 jstcache="0">Finding the path to Chrome</h3> <p jstcache="0"> If <code jstcache="0">chrome.exe</code> isn't already in your path, you need to specify the complete path to it. Here's how: </p> <ul jstcache="0"> <li jstcache="0"> In Windows XP, right-click your Google Chrome shortcut, choose <b jstcache="0">Properties &gt; Shortcut</b>, and then choose <b jstcache="0">Find Target</b>. </li> <li jstcache="0"> In Vista, right-click your Google Chrome shortcut and select <b jstcache="0">Open File Location</b>. </li> </ul> <a name="H2-2" jstcache="0"></a><h2 id="update" jstcache="0">Updating a package</h2> <p jstcache="0">To create an updated version of your extension:</p> <ol jstcache="0"> <li jstcache="0">Increase the version number in <code jstcache="0">manifest.json</code>.</li> <li jstcache="0">Close all your Chrome windows.</li> <li jstcache="0">Execute Chrome, using the <code jstcache="0">--pack-extension</code> and <code jstcache="0">--pack-extension-key</code> options. The value of the key option should be the path to the already generated <code jstcache="0">.pem</code> file for this extension. <pre jstcache="0">chrome.exe --pack-extension=<em jstcache="0">ext-folder-path</em> --pack-extension-key=<em jstcache="0">ext-key-path</em></pre> </li> </ol> <p jstcache="0">If the updated extension is successfully packaged, you'll see a dialog like this:</p> <img src="images/package-success.png" jstcache="0"> <a name="H2-3" jstcache="0"></a><h2 jstcache="0">Tips and tricks</h2> <ul jstcache="0"> <li jstcache="0">In build 3.0.195 and later, you can use the <code jstcache="0">--no-message-box</code> command line flag to suppress the dialog. This is useful if you're packing extensions in non-interactive scripts.</li> </ul> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39"> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/pageActions.html b/chrome/common/extensions/docs/pageActions.html
index 0071559..baea0a73 100755
--- a/chrome/common/extensions/docs/pageActions.html
+++ b/chrome/common/extensions/docs/pageActions.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Page Actions</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Page Actions</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0" class="leftNavSelected">Page Actions</li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">User interface</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Manifest</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-2">Events</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference: chrome.pageActions</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5" style="display: none; "> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-enableForTab" jstcache="43">enableForTab</a> </li><li jsselect="functions" jstcache="11" jsinstance="*1"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-disableForTab" jstcache="43">disableForTab</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7" style="display: none; "> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8" style="display: none; "> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="45">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Page Actions</div> <!-- BEGIN AUTHORED CONTENT --> <p jstcache="0">Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).</p> <a name="H2-0" jstcache="0"></a><h2 jstcache="0">User interface</h2> <p jstcache="0">Page actions are displayed as icons on the right side of the OmniBox.</p> <img src="images/pageaction-omnibar-icons.png" jstcache="0"> <a name="H2-1" jstcache="0"></a><h2 jstcache="0">Manifest</h2> <p jstcache="0">Developers can declare page actions in the manifest using the following syntax:</p> <pre jstcache="0">"page_actions": [ { "id": "myaction", // Chosen by the developer. Should be unique within their extension. "name": "Do action", // The page action name, also used as tooltip (unless overridden). "icons": ["favicon.png", "favicon2.png"] } ]</pre> <p jstcache="0">Supported icon image formats include for example: png, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be resized to fit. For optimal performance, consider using an image that does not have to be resized to fit.</p> <a name="H2-2" jstcache="0"></a><h2 jstcache="0">Events</h2> <p jstcache="0">Each page action displays an icon in the OmniBox. Whenever the user clicks the icon an event is sent to the extension, signifying that the user wants to apply an action to the current page. To receive notifications about the event, the extension must register a listener.</p> <p jstcache="0">Page action events are created dynamically using the id of the page action declared in the manifest. For example, a page action with id 'foo' will setup an event called chrome.pageActions["foo"]. An extension would then register listeners like so:</p> <pre jstcache="0">chrome.pageActions["foo"].addListener(function(object reply) { console.log(reply.pageActionId); // Display the id of the page action. console.log(reply.data.tabId); // Display the id of the tab for which the page action event applies. console.log(reply.data.tabUrl); // Display the URL of the page for which the page action event applies. });</pre> <p style="margin-left:25px;" jstcache="0"><strong jstcache="0">Parameters</strong></p> <p style="margin-left:25px;" jstcache="0"><i jstcache="0">reply ( object )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;An object containing the information about the event. Contains the following properties:</p> <p style="margin-left:50px;" jstcache="0"><i jstcache="0">pageActionId ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The id of the page action that triggered the event.</p> <p style="margin-left:50px;" jstcache="0"><i jstcache="0">data ( object )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;An object specifying what tab and which page the event applies to. Contains the following properties:</p> <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabId ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The id of the tab that was active when the event was triggered.</p> <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabUrl ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The url of the page for which the page action applies to.</p> <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3"> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.pageActions API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5" style="display: none; "> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11" jsinstance="0"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-enableForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">enableForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.pageActions.enableForTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">string</span> <var jstcache="0"><span jscontent="name" jstcache="16">pageActionId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class=""><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">action</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30">Enables a page action for a particular tab+url combination (makes its icon visible in the OmniBox when a certain url is active in a given tab). The page action will automatically be disabled (its icon hidden) if the user navigates to a new URL or closes the tab. The action will also automatically be enabled/disabled as the user switches tabs.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">pageActionId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to enable (and must match a page action id declared in the manifest).</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">action</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">An object specifing what action should be applied to the page action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">The id of the tab for which you want to enable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">The URL of the page you want the page action to apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">title</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">Specifying |title| allows you to change the tooltip that appears when you hover over the page action icon in the OmniBox. This parameter is optional and if omitted then the page action |name| property declared in the manifest is used.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">iconId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">A zero-based index into the |icons| vector specified in the manifest. This parameter is optional and if omitted then the first icon in the |icons| vector of the page action is used. This id is useful to represent different page action states. Example: An RSS feed icon could have a 'subscribe now' icon and an 'already subscribed' icon.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="*1"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-disableForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">disableForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.pageActions.disableForTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">string</span> <var jstcache="0"><span jscontent="name" jstcache="16">pageActionId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class=""><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">action</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30">Disables a page action for a particular tab+url combination (makes its OmniBox page action icon hidden when a certain url is active in a given tab). This can be useful to disable a page action before the user navigates away from a page containing an enabled page action.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">pageActionId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to disable (and must match a page action id declared in the manifest).</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">action</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">An object specifying what action should be applied to the page action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">The id of the tab for which you want to disable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">The URL of the page you want the page action to not apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7" style="display: none; "> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8" style="display: none; "> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">Page Actions</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">Page Actions</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0" class="leftNavSelected">Page Actions</li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-0">Manifest</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Events</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.pageActions</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5" style="display: none; "> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-enableForTab" jstcache="42">enableForTab</a> </li><li jsselect="functions" jstcache="11" jsinstance="*1"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-disableForTab" jstcache="42">disableForTab</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7" style="display: none; "> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8" style="display: none; "> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Page Actions</div> <!-- BEGIN AUTHORED CONTENT --> <p jstcache="0">Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).</p> <p jstcache="0"> Page actions are displayed as icons on the right side of the OmniBox. The RSS icon in the following screenshot represents a page action that lets you subscribe to the RSS feed for the current page. </p> <img src="images/page-action.png" width="361" height="79" jstcache="0"> <a name="H2-0" jstcache="0"></a><h2 id="manifest" jstcache="0">Manifest</h2> <p jstcache="0">Developers can declare page actions in the manifest using the following syntax:</p> <pre jstcache="0">"page_actions": [ { "id": "myaction", // Chosen by the developer. Should be unique within their extension. "name": "Do action", // The page action name, also used as tooltip (unless overridden). "icons": ["favicon.png", "favicon2.png"] } ]</pre> <p jstcache="0">Supported icon image formats include for example: png, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be resized to fit. For optimal performance, consider using an image that does not have to be resized to fit.</p> <a name="H2-1" jstcache="0"></a><h2 jstcache="0">Events</h2> <p jstcache="0">Each page action displays an icon in the OmniBox. Whenever the user clicks the icon an event is sent to the extension, signifying that the user wants to apply an action to the current page. To receive notifications about the event, the extension must register a listener.</p> <p jstcache="0">Page action events are created dynamically using the id of the page action declared in the manifest. For example, a page action with id 'foo' will setup an event called chrome.pageActions["foo"]. An extension would then register listeners like so:</p> <pre jstcache="0">chrome.pageActions["foo"].addListener(function(object reply) { console.log(reply.pageActionId); // Display the id of the page action. console.log(reply.data.tabId); // Display the id of the tab for which the page action event applies. console.log(reply.data.tabUrl); // Display the URL of the page for which the page action event applies. });</pre> <p style="margin-left:25px;" jstcache="0"><strong jstcache="0">Parameters</strong></p> <p style="margin-left:25px;" jstcache="0"><i jstcache="0">reply ( object )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;An object containing the information about the event. Contains the following properties:</p> <p style="margin-left:50px;" jstcache="0"><i jstcache="0">pageActionId ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The id of the page action that triggered the event.</p> <p style="margin-left:50px;" jstcache="0"><i jstcache="0">data ( object )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;An object specifying what tab and which page the event applies to. Contains the following properties:</p> <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabId ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The id of the tab that was active when the event was triggered.</p> <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabUrl ( string )</i><br jstcache="0"> &nbsp;&nbsp;&nbsp;The url of the page for which the page action applies to.</p> <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3"> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.pageActions</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5" style="display: none; "> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11" jsinstance="0"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-enableForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">enableForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.pageActions.enableForTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">string</span> <var jstcache="0"><span jscontent="name" jstcache="16">pageActionId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class=""><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">action</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29">Enables a page action for a particular tab+url combination (makes its icon visible in the OmniBox when a certain url is active in a given tab). The page action will automatically be disabled (its icon hidden) if the user navigates to a new URL or closes the tab. The action will also automatically be enabled/disabled as the user switches tabs.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">pageActionId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to enable (and must match a page action id declared in the manifest).</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">action</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">An object specifing what action should be applied to the page action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">The id of the tab for which you want to enable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">The URL of the page you want the page action to apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">title</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">Specifying |title| allows you to change the tooltip that appears when you hover over the page action icon in the OmniBox. This parameter is optional and if omitted then the page action |name| property declared in the manifest is used.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">iconId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">A zero-based index into the |icons| vector specified in the manifest. This parameter is optional and if omitted then the first icon in the |icons| vector of the page action is used. This id is useful to represent different page action states. Example: An RSS feed icon could have a 'subscribe now' icon and an 'already subscribed' icon.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="*1"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-disableForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">disableForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.pageActions.disableForTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">string</span> <var jstcache="0"><span jscontent="name" jstcache="16">pageActionId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class=""><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">action</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29">Disables a page action for a particular tab+url combination (makes its OmniBox page action icon hidden when a certain url is active in a given tab). This can be useful to disable a page action before the user navigates away from a page containing an enabled page action.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">pageActionId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to disable (and must match a page action id declared in the manifest).</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">action</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">An object specifying what action should be applied to the page action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">The id of the tab for which you want to disable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">The URL of the page you want the page action to not apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7" style="display: none; "> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8" style="display: none; "> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html
index 50bbfa2..6e0bd7d 100755
--- a/chrome/common/extensions/docs/tabs.html
+++ b/chrome/common/extensions/docs/tabs.html
@@ -1 +1 @@
-<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">chrome.tabs</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">chrome.tabs</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0" class="leftNavSelected">Tabs</li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0">Other APIs</li> </ul> </li> <li jstcache="0">Samples <ul jstcache="0"> <li jstcache="0">[sample 1]</li> <li jstcache="0">[sample 2]</li> </ul> </li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h2Name</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API Reference: ' + getModuleName()" jstcache="23">API Reference: chrome.tabs</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5" style="display: none; "> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-get" jstcache="43">get</a> </li><li jsselect="functions" jstcache="11" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-connect" jstcache="43">connect</a> </li><li jsselect="functions" jstcache="11" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-getSelected" jstcache="43">getSelected</a> </li><li jsselect="functions" jstcache="11" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-getAllInWindow" jstcache="43">getAllInWindow</a> </li><li jsselect="functions" jstcache="11" jsinstance="4"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-create" jstcache="43">create</a> </li><li jsselect="functions" jstcache="11" jsinstance="5"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-update" jstcache="43">update</a> </li><li jsselect="functions" jstcache="11" jsinstance="6"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-move" jstcache="43">move</a> </li><li jsselect="functions" jstcache="11" jsinstance="7"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-remove" jstcache="43">remove</a> </li><li jsselect="functions" jstcache="11" jsinstance="8"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-detectLanguage" jstcache="43">detectLanguage</a> </li><li jsselect="functions" jstcache="11" jsinstance="*9"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-captureVisibleTab" jstcache="43">captureVisibleTab</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onCreated" jstcache="44">onCreated</a> </li><li jsselect="events" jstcache="12" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onUpdated" jstcache="44">onUpdated</a> </li><li jsselect="events" jstcache="12" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onMoved" jstcache="44">onMoved</a> </li><li jsselect="events" jstcache="12" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onSelectionChanged" jstcache="44">onSelectionChanged</a> </li><li jsselect="events" jstcache="12" jsinstance="4"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onAttached" jstcache="44">onAttached</a> </li><li jsselect="events" jstcache="12" jsinstance="5"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onDetached" jstcache="44">onDetached</a> </li><li jsselect="events" jstcache="12" jsinstance="*6"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onRemoved" jstcache="44">onRemoved</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13" jsinstance="*0"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#type-Tab" jstcache="45">Tab</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><!-- BEGIN AUTHORED CONTENT --> <p class="todo" jstcache="0"> [PENDING: API Module Overview Goes Here] </p> <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3"> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getModuleName() + ' API reference'" jstcache="4">chrome.tabs API reference</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5" style="display: none; "> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.name" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11" jsinstance="0"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-get"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">get</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.get</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="1"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-connect"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">connect</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26">Port</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.connect</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">string</span> <var jstcache="0"><span jscontent="name" jstcache="16">name</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">name</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46" style="display: none; ">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="extension.html#type-Port">Port</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="2"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-getSelected"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">getSelected</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.getSelected</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="3"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-getAllInWindow"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">getAllInWindow</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.getAllInWindow</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">array of Tab tabs</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabs</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style=""> array of <span jsselect="items" jstcache="53"><span jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52" style="display: none; ">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="4"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-create"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">create</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.create</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">createProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">createProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="5"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-update"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">update</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.update</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">updateProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*2" class="optional"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">updateProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*2"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="6"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-move"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">move</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.move</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">moveProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*2" class="optional"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">moveProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*2"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="7"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-remove"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">remove</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.remove</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="8"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-detectLanguage"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">detectLanguage</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.detectLanguage</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30">detect language of tab.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">string language</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">language</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="*9"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-captureVisibleTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">captureVisibleTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">chrome.tabs.captureVisibleTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30">Captures the visible area of the visible tab in the given window.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40">The target window. If <var jstcache="0">null</var> or <var jstcache="0">undefined</var>, the 'current' window will be assumed.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="37" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="32"> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="33">string dataUrl</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">dataUrl</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="">a data url encoding of the captured tab.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12" jsinstance="0"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onCreated"></a> <h4 jscontent="name" jstcache="16">onCreated</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onCreated</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="1"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onUpdated"></a> <h4 jscontent="name" jstcache="16">onUpdated</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onUpdated</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId, object changeInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">changeInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">status</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="2"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onMoved"></a> <h4 jscontent="name" jstcache="16">onMoved</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onMoved</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId, object moveInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">moveInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">fromIndex</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">toIndex</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="3"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onSelectionChanged"></a> <h4 jscontent="name" jstcache="16">onSelectionChanged</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onSelectionChanged</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId, object selectInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">selectInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="4"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onAttached"></a> <h4 jscontent="name" jstcache="16">onAttached</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onAttached</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId, object attachInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">attachInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">newWindowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">newPosition</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="5"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onDetached"></a> <h4 jscontent="name" jstcache="16">onDetached</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onDetached</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId, object detachInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="36" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">detachInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">oldWindowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">oldPosition</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="*6"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onRemoved"></a> <h4 jscontent="name" jstcache="16">onRemoved</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="24">chrome.tabs.</span><span jscontent="name" jstcache="16">onRemoved</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="33">integer tabId</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="29">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="30" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="36" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13" jsinstance="*0"> <a jsvalues=".name:'type-' + id" jstcache="20" name="type-Tab"></a> <h4 jscontent="id" jstcache="21">Tab</h4> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46" style="display: none; ">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">id</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="4"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="5"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">title</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="6"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">favIconUrl</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*7"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">status</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="39"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="40" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mechanism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTML is also generated by an offline step so that this page may easily be indexed by search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes the single version of page template shell and the "instance" pages (bookmarks.html, etc...) can be generated with a build step. --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> data is significant and loads the needed libraries and styles --><head jstcache="0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache="0"> <title jscontent="getPageTitle()" jstcache="1">chrome.tabs</title> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_generator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="http://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitle()" jstcache="1">chrome.tabs</h1> </div> </div> <!-- /pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0" class="leftNavSelected">Tabs</li> <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h2Name</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.tabs</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5" style="display: none; "> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jstcache="0"> <li jsselect="functions" jstcache="11" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-get" jstcache="42">get</a> </li><li jsselect="functions" jstcache="11" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-connect" jstcache="42">connect</a> </li><li jsselect="functions" jstcache="11" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-getSelected" jstcache="42">getSelected</a> </li><li jsselect="functions" jstcache="11" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-getAllInWindow" jstcache="42">getAllInWindow</a> </li><li jsselect="functions" jstcache="11" jsinstance="4"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-create" jstcache="42">create</a> </li><li jsselect="functions" jstcache="11" jsinstance="5"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-update" jstcache="42">update</a> </li><li jsselect="functions" jstcache="11" jsinstance="6"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-move" jstcache="42">move</a> </li><li jsselect="functions" jstcache="11" jsinstance="7"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-remove" jstcache="42">remove</a> </li><li jsselect="functions" jstcache="11" jsinstance="8"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-detectLanguage" jstcache="42">detectLanguage</a> </li><li jsselect="functions" jstcache="11" jsinstance="*9"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-captureVisibleTab" jstcache="42">captureVisibleTab</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" jstcache="12" jsinstance="0"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onCreated" jstcache="43">onCreated</a> </li><li jsselect="events" jstcache="12" jsinstance="1"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onUpdated" jstcache="43">onUpdated</a> </li><li jsselect="events" jstcache="12" jsinstance="2"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onMoved" jstcache="43">onMoved</a> </li><li jsselect="events" jstcache="12" jsinstance="3"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onSelectionChanged" jstcache="43">onSelectionChanged</a> </li><li jsselect="events" jstcache="12" jsinstance="4"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onAttached" jstcache="43">onAttached</a> </li><li jsselect="events" jstcache="12" jsinstance="5"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onDetached" jstcache="43">onDetached</a> </li><li jsselect="events" jstcache="12" jsinstance="*6"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-onRemoved" jstcache="43">onRemoved</a> </li> </ol> </li> <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13" jsinstance="*0"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#type-Tab" jstcache="44">Tab</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><!-- BEGIN AUTHORED CONTENT --> <p class="todo" jstcache="0"> [PENDING: API Module Overview Goes Here] </p> <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache="3"> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.tabs</h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5" style="display: none; "> <a name="properties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11" jsinstance="0"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-get"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">get</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.get</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="1"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-connect"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">connect</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">Port</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.connect</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">connectInfo</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">connectInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">name</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="">Will be passed into onConnect for content scripts that are listening for the connection event.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45" style="display: none; ">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="extension.html#type-Port">Port</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31" style="display: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="2"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-getSelected"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">getSelected</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.getSelected</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="3"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-getAllInWindow"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">getAllInWindow</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.getAllInWindow</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">array of Tab tabs</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabs</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style=""> array of <span jsselect="items" jstcache="52"><span jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51" style="display: none; ">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="4"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-create"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">create</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.create</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">createProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">createProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="5"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-update"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">update</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.update</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">updateProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*2" class="optional"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">updateProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*2"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="6"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-move"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">move</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.move</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">object</span> <var jstcache="0"><span jscontent="name" jstcache="16">moveProperties</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*2" class="optional"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">moveProperties</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*2"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="7"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-remove"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">remove</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.remove</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="optional"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32"></span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="8"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-detectLanguage"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">detectLanguage</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.detectLanguage</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">tabId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29">detect language of tab.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">string language</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">language</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinstance="*9"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-captureVisibleTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">captureVisibleTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chrome.tabs.captureVisibleTab</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="optional"><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="34">integer</span> <var jstcache="0"><span jscontent="name" jstcache="16">windowId</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="*1" class="null"><span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">function</span> <var jstcache="0"><span jscontent="name" jstcache="16">callback</span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28" style="display: none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29">Captures the visible area of the visible tab in the given window.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39">The target window. If <var jstcache="0">null</var> or <var jstcache="0">undefined</var>, the 'current' window will be assumed.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">callback</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">function</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(parameters)" jstcache="32">string dataUrl</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">dataUrl</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="">a data url encoding of the captured tab.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstcache="12" jsinstance="0"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onCreated"></a> <h4 jscontent="name" jstcache="16">onCreated</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onCreated</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">Tab tab</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tab</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style=""> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49" href="tabs.html#type-Tab">Tab</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48" style="display: none; "> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="1"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onUpdated"></a> <h4 jscontent="name" jstcache="16">onUpdated</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onUpdated</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId, object changeInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">changeInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">status</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="2"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onMoved"></a> <h4 jscontent="name" jstcache="16">onMoved</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onMoved</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId, object moveInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">moveInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">fromIndex</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">toIndex</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="3"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onSelectionChanged"></a> <h4 jscontent="name" jstcache="16">onSelectionChanged</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onSelectionChanged</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId, object selectInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">selectInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="4"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onAttached"></a> <h4 jscontent="name" jstcache="16">onAttached</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onAttached</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId, object attachInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">attachInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">newWindowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">newPosition</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="5"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onDetached"></a> <h4 jscontent="name" jstcache="16">onDetached</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onDetached</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId, object detachInfo</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="parameters" jstcache="35" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">detachInfo</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">oldWindowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">oldPosition</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div><div jsselect="events" class="apiItem" jstcache="12" jsinstance="*6"> <a jsvalues=".name:'event-' + name" jstcache="19" name="event-onRemoved"></a> <h4 jscontent="name" jstcache="16">onRemoved</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.tabs.</span><span jscontent="name" jstcache="16">onRemoved</span><span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignatureString(parameters)" jstcache="32">integer tabId</span>) <span class="subdued" jstcache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:description" jstcache="29" style="display: none; "> A description from the json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" jsinstance="*0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13" jsinstance="*0"> <a jsvalues=".name:'type-' + id" jstcache="20" name="type-Tab"></a> <h4 jscontent="id" jstcache="21">Tab</h4> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45" style="display: none; ">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">object</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style=""> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">id</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">index</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">windowId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="3"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">selected</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">boolean</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="4"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="5"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">title</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="6"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">favIconUrl</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*7"> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">status</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39" style="display: none; "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms of use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html>
diff --git a/chrome/renderer/extensions/extension_api_client_unittest.cc b/chrome/renderer/extensions/extension_api_client_unittest.cc
index d5f73bb..874f2bf 100644
--- a/chrome/renderer/extensions/extension_api_client_unittest.cc
+++ b/chrome/renderer/extensions/extension_api_client_unittest.cc
@@ -157,19 +157,22 @@ TEST_F(ExtensionAPIClientTest, GetLastFocusedWindow) {
}
TEST_F(ExtensionAPIClientTest, GetAllWindows) {
- ExpectJsFail("chrome.windows.getAll(true, function(){}, 20);",
+ ExpectJsFail("chrome.windows.getAll({populate: true}, function(){}, 20);",
"Uncaught Error: Too many arguments.");
ExpectJsFail("chrome.windows.getAll(1, function(){});",
"Uncaught Error: Invalid value for argument 0. "
- "Expected 'boolean' but got 'integer'.");
+ "Expected 'object' but got 'integer'.");
- ExpectJsPass("chrome.windows.getAll(true, function(){})",
- "windows.getAll", "true");
+ ExpectJsPass("chrome.windows.getAll({populate:true}, function(){})",
+ "windows.getAll", "{\"populate\":true}");
ExpectJsPass("chrome.windows.getAll(null, function(){})",
"windows.getAll", "null");
+ ExpectJsPass("chrome.windows.getAll({}, function(){})",
+ "windows.getAll", "{}");
+
ExpectJsPass("chrome.windows.getAll(undefined, function(){})",
"windows.getAll", "null");
}
@@ -535,42 +538,53 @@ TEST_F(ExtensionAPIClientTest, EnablePageAction) {
}
TEST_F(ExtensionAPIClientTest, ExpandToolstrip) {
- ExpectJsPass("chrome.toolstrip.expand(100, 'http://foo/')",
+ ExpectJsPass("chrome.toolstrip.expand({height:100, url:'http://foo/'})",
"toolstrip.expand",
- "[100,\"http://foo/\"]");
- ExpectJsPass("chrome.toolstrip.expand(100, null)",
+ "{\"height\":100,\"url\":\"http://foo/\"}");
+ ExpectJsPass("chrome.toolstrip.expand({height:100}, null)",
"toolstrip.expand",
- "[100,null]");
- ExpectJsPass("chrome.toolstrip.expand(100, 'http://foo/', function(){})",
+ "{\"height\":100}");
+ ExpectJsPass("chrome.toolstrip.expand({height:100,url:'http://foo/'}, "
+ "function(){})",
"toolstrip.expand",
- "[100,\"http://foo/\"]");
+ "{\"height\":100,\"url\":\"http://foo/\"}");
+
- ExpectJsFail("chrome.toolstrip.expand('100', 'http://foo/')",
+ ExpectJsFail("chrome.toolstrip.expand()",
+ "Uncaught Error: Parameter 0 is required.");
+ ExpectJsFail("chrome.toolstrip.expand(1)",
+ "Uncaught Error: Invalid value for argument 0. "
+ "Expected 'object' but got 'integer'.");
+ ExpectJsFail("chrome.toolstrip.expand({height:'100', url:'http://foo/'})",
"Uncaught Error: Invalid value for argument 0. "
+ "Property 'height': "
"Expected 'integer' but got 'string'.");
- ExpectJsFail("chrome.toolstrip.expand(100, 100)",
- "Uncaught Error: Invalid value for argument 1. "
+ ExpectJsFail("chrome.toolstrip.expand({height:100,url:100})",
+ "Uncaught Error: Invalid value for argument 0. Property 'url': "
"Expected 'string' but got 'integer'.");
- ExpectJsFail("chrome.toolstrip.expand(100, 'http://foo/', 32)",
- "Uncaught Error: Invalid value for argument 2. "
+ ExpectJsFail("chrome.toolstrip.expand({height:100,'url':'http://foo/'}, 32)",
+ "Uncaught Error: Invalid value for argument 1. "
"Expected 'function' but got 'integer'.");
}
TEST_F(ExtensionAPIClientTest, CollapseToolstrip) {
- ExpectJsPass("chrome.toolstrip.collapse('http://foo/')",
+ ExpectJsPass("chrome.toolstrip.collapse({url:'http://foo/'})",
"toolstrip.collapse",
- "\"http://foo/\"");
+ "{\"url\":\"http://foo/\"}");
ExpectJsPass("chrome.toolstrip.collapse(null)",
"toolstrip.collapse",
"null");
- ExpectJsPass("chrome.toolstrip.collapse('http://foo/', function(){})",
+ ExpectJsPass("chrome.toolstrip.collapse({url:'http://foo/'}, function(){})",
"toolstrip.collapse",
- "\"http://foo/\"");
+ "{\"url\":\"http://foo/\"}");
+ ExpectJsFail("chrome.toolstrip.collapse(1)",
+ "Uncaught Error: Invalid value for argument 0. "
+ "Expected 'object' but got 'integer'.");
ExpectJsFail("chrome.toolstrip.collapse(100)",
"Uncaught Error: Invalid value for argument 0. "
- "Expected 'string' but got 'integer'.");
- ExpectJsFail("chrome.toolstrip.collapse('http://foo/', 32)",
+ "Expected 'object' but got 'integer'.");
+ ExpectJsFail("chrome.toolstrip.collapse({url:'http://foo/'}, 32)",
"Uncaught Error: Invalid value for argument 1. "
"Expected 'function' but got 'integer'.");
}
diff --git a/chrome/renderer/renderer_resources.grd b/chrome/renderer/renderer_resources.grd
index b426d6e..5ec2309 100644
--- a/chrome/renderer/renderer_resources.grd
+++ b/chrome/renderer/renderer_resources.grd
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This comment is only here because changes to resources are not picked up
-without changes to the corresponding grd file. aa4 -->
+without changes to the corresponding grd file. rw -->
<grit latest_public_release="0" current_release="1">
<outputs>
<output filename="grit/renderer_resources.h" type="rc_header">
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js
index 697e0a7..4312d04 100644
--- a/chrome/renderer/resources/extension_process_bindings.js
+++ b/chrome/renderer/resources/extension_process_bindings.js
@@ -75,7 +75,7 @@ var chrome = chrome || {};
"message": error
};
}
-
+
if (request.callback) {
// Callbacks currently only support one callback argument.
var callbackArgs = response ? [JSON.parse(response)] : [];
@@ -117,7 +117,7 @@ var chrome = chrome || {};
function prepareRequest(args, argSchemas) {
var request = {};
var argCount = args.length;
-
+
// Look for callback param.
if (argSchemas.length > 0 &&
args.length == argSchemas.length &&
@@ -138,7 +138,7 @@ var chrome = chrome || {};
request.args[k] = args[k];
}
}
-
+
return request;
}
@@ -154,7 +154,7 @@ var chrome = chrome || {};
return StartRequest(functionName, sargs, requestId,
request.callback ? true : false);
}
-
+
// Using forEach for convenience, and to bind |module|s & |apiDefs|s via
// closures.
function forEach(a, f) {
@@ -189,7 +189,7 @@ var chrome = chrome || {};
// http://code.google.com/p/chromium/issues/detail?id=16356
chrome.self = chrome.extension;
- // |apiFunctions| is a hash of name -> object that stores the
+ // |apiFunctions| is a hash of name -> object that stores the
// name & definition of the apiFunction. Custom handling of api functions
// is implemented by adding a "handleRequest" function to the object.
var apiFunctions = {};
@@ -199,7 +199,7 @@ var chrome = chrome || {};
// and validating either here, in a unit_test or both.
// TODO(rafaelw): Handle synchronous functions.
// TOOD(rafaelw): Consider providing some convenient override points
- // for api functions that wish to insert themselves into the call.
+ // for api functions that wish to insert themselves into the call.
var apiDefinitions = JSON.parse(GetExtensionAPIDefinition());
forEach(apiDefinitions, function(apiDef) {
@@ -221,19 +221,19 @@ var chrome = chrome || {};
if (module[functionDef.name])
return;
- var apiFunction = {};
+ var apiFunction = {};
apiFunction.definition = functionDef;
apiFunction.name = apiDef.namespace + "." + functionDef.name;;
apiFunctions[apiFunction.name] = apiFunction;
-
+
module[functionDef.name] = bind(apiFunction, function() {
chromeHidden.validate(arguments, this.definition.parameters);
-
+
if (this.handleRequest)
return this.handleRequest.apply(this, arguments);
- else
+ else
return sendRequest(this.name, arguments,
- this.definition.parameters);
+ this.definition.parameters);
});
});
}
@@ -253,10 +253,14 @@ var chrome = chrome || {};
}
});
- apiFunctions["tabs.connect"].handleRequest = function(tabId, opt_name) {
+ apiFunctions["tabs.connect"].handleRequest = function(tabId, connectInfo) {
+ var name = "";
+ if (connectInfo) {
+ name = connectInfo.name || name;
+ }
var portId = OpenChannelToTab(
- tabId, chrome.extension.id_, opt_name || "");
- return chromeHidden.Port.createPort(portId, opt_name);
+ tabId, chrome.extension.id_, name);
+ return chromeHidden.Port.createPort(portId, name);
}
apiFunctions["extension.getViews"].handleRequest = function() {
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js
index cf53de9..6e9b387 100644
--- a/chrome/renderer/resources/renderer_extension_bindings.js
+++ b/chrome/renderer/resources/renderer_extension_bindings.js
@@ -16,7 +16,7 @@
var chrome = chrome || {};
(function () {
- native function OpenChannelToExtension(id);
+ native function OpenChannelToExtension(id, name);
native function CloseChannel(portId);
native function PortAddRef(portId);
native function PortRelease(portId);
@@ -115,11 +115,15 @@ var chrome = chrome || {};
// Opens a message channel to the extension. Returns a Port for
// message passing.
- chrome.Extension.prototype.connect = function(opt_name) {
- var portId = OpenChannelToExtension(this.id_, opt_name || "");
+ chrome.Extension.prototype.connect = function(connectInfo) {
+ var name = "";
+ if (connectInfo) {
+ name = connectInfo.name || name;
+ }
+ var portId = OpenChannelToExtension(this.id_, name);
if (portId == -1)
throw new Error("No such extension: '" + this.id_ + "'");
- return chromeHidden.Port.createPort(portId, opt_name);
+ return chromeHidden.Port.createPort(portId, name);
};
// Returns a resource URL that can be used to fetch a resource from this
diff --git a/chrome/test/data/extensions/browsertest/last_error/toolstrip.html b/chrome/test/data/extensions/browsertest/last_error/toolstrip.html
index 01af2af..6df972e 100755
--- a/chrome/test/data/extensions/browsertest/last_error/toolstrip.html
+++ b/chrome/test/data/extensions/browsertest/last_error/toolstrip.html
@@ -18,7 +18,7 @@ function testLastError() {
var maxTabId = 0;
// Find the highest tab id
- chrome.windows.getAll(true, function(windows) {
+ chrome.windows.getAll({populate:true}, function(windows) {
// Make sure lastError is still not set. (this call have should succeeded).
if (chrome.tabs.lastError)
fail();
diff --git a/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js b/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js
index feacd93..34d27fc 100644
--- a/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js
+++ b/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js
@@ -18,6 +18,8 @@ win.onload = function() {
port.disconnect();
} else if (msg.testDisconnectOnClose) {
win.location = "about:blank";
+ } else if (msg.testPortName) {
+ port.postMessage({portName:port.name});
}
// Ignore other messages since they are from us.
});
@@ -27,10 +29,11 @@ win.onload = function() {
// Tests that postMessage to the extension and its response works.
function testPostMessageFromTab(origPort) {
console.log('testPostMessageFromTab');
- var port = chrome.extension.connect();
+ var portName = "peter";
+ var port = chrome.extension.connect({name: portName});
port.postMessage({testPostMessageFromTab: true});
port.onMessage.addListener(function(msg) {
- origPort.postMessage({success: msg.success});
+ origPort.postMessage({success: (msg.success && (msg.portName == portName))});
console.log('sent ' + msg.success);
port.disconnect();
});
diff --git a/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/toolstrip.html b/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/toolstrip.html
index a8bfe7e..84c7db0 100644
--- a/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/toolstrip.html
+++ b/chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/toolstrip.html
@@ -1,65 +1,80 @@
-<script>
-window.onload = function() {
- chrome.extension.onConnect.addListener(function(port) {
- console.log('onConnect');
- port.onMessage.addListener(function(msg) {
- console.log('got message');
- if (msg.testPostMessageFromTab) {
- port.postMessage({success: true});
- console.log('sent success');
- }
- // Ignore other messages since they are from us.
- });
- });
-};
-
-// Tests that postMessage to the tab and its response works.
-function testPostMessage() {
- chrome.tabs.getSelected(null, function(tab) {
- var port = chrome.tabs.connect(tab.id);
- console.log('connect to ' + tab.id);
- port.postMessage({testPostMessage: true});
- port.onMessage.addListener(function(msg) {
- window.domAutomationController.send(msg.success);
- port.disconnect();
- });
- });
-}
-
-// Tests that postMessage from the tab and its response works.
-function testPostMessageFromTab() {
- chrome.tabs.getSelected(null, function(tab) {
- var port = chrome.tabs.connect(tab.id);
- console.log('connect to ' + tab.id);
- port.postMessage({testPostMessageFromTab: true});
- port.onMessage.addListener(function(msg) {
- window.domAutomationController.send(msg.success);
- port.disconnect();
- });
- });
-}
-
-// Tests that we get the disconnect event when the tab disconnect.
-function testDisconnect() {
- chrome.tabs.getSelected(null, function(tab) {
- var port = chrome.tabs.connect(tab.id);
- console.log('connect to ' + tab.id);
- port.postMessage({testDisconnect: true});
- port.onDisconnect.addListener(function() {
- window.domAutomationController.send(true);
- });
- });
-}
-
-// Tests that we get the disconnect event when the tab context closes.
-function testDisconnectOnClose() {
- chrome.tabs.getSelected(null, function(tab) {
- var port = chrome.tabs.connect(tab.id);
- console.log('connect to ' + tab.id);
- port.postMessage({testDisconnectOnClose: true});
- port.onDisconnect.addListener(function() {
- window.domAutomationController.send(true);
- });
- });
-}
-</script>
+<script>
+window.onload = function() {
+ chrome.extension.onConnect.addListener(function(port) {
+ console.log('onConnect');
+ port.onMessage.addListener(function(msg) {
+ console.log('got message');
+ if (msg.testPostMessageFromTab) {
+ port.postMessage({success: true, portName: port.name});
+ console.log('sent success');
+ }
+ // Ignore other messages since they are from us.
+ });
+ });
+};
+
+// Tests that postMessage to the tab and its response works.
+function testPostMessage() {
+ chrome.tabs.getSelected(null, function(tab) {
+ var port = chrome.tabs.connect(tab.id);
+ console.log('connect to ' + tab.id);
+ port.postMessage({testPostMessage: true});
+ port.onMessage.addListener(function(msg) {
+ window.domAutomationController.send(msg.success);
+ port.disconnect();
+ });
+ });
+}
+
+// Tests that port name is sent & received correctly.
+function testPortName() {
+ chrome.tabs.getSelected(null, function(tab) {
+ var portName = "lemonjello";
+ var port = chrome.tabs.connect(tab.id, {name: portName});
+ console.log('naming port ' + portName);
+ port.postMessage({testPortName: true});
+ port.onMessage.addListener(function(msg) {
+ console.log('got name ' + msg.portName);
+ window.domAutomationController.send(msg.portName == portName);
+ port.disconnect();
+ });
+ });
+}
+
+// Tests that postMessage from the tab and its response works.
+function testPostMessageFromTab() {
+ chrome.tabs.getSelected(null, function(tab) {
+ var port = chrome.tabs.connect(tab.id);
+ console.log('connect to ' + tab.id);
+ port.postMessage({testPostMessageFromTab: true});
+ port.onMessage.addListener(function(msg) {
+ window.domAutomationController.send(msg.success);
+ port.disconnect();
+ });
+ });
+}
+
+// Tests that we get the disconnect event when the tab disconnect.
+function testDisconnect() {
+ chrome.tabs.getSelected(null, function(tab) {
+ var port = chrome.tabs.connect(tab.id);
+ console.log('connect to ' + tab.id);
+ port.postMessage({testDisconnect: true});
+ port.onDisconnect.addListener(function() {
+ window.domAutomationController.send(true);
+ });
+ });
+}
+
+// Tests that we get the disconnect event when the tab context closes.
+function testDisconnectOnClose() {
+ chrome.tabs.getSelected(null, function(tab) {
+ var port = chrome.tabs.connect(tab.id);
+ console.log('connect to ' + tab.id);
+ port.postMessage({testDisconnectOnClose: true});
+ port.onDisconnect.addListener(function() {
+ window.domAutomationController.send(true);
+ });
+ });
+}
+</script>
diff --git a/chrome/test/data/extensions/samples/bookmarks/bookmark_api.html b/chrome/test/data/extensions/samples/bookmarks/bookmark_api.html
index 886b43f..7421ad6 100644
--- a/chrome/test/data/extensions/samples/bookmarks/bookmark_api.html
+++ b/chrome/test/data/extensions/samples/bookmarks/bookmark_api.html
@@ -34,7 +34,7 @@ var testMoveBookmarks2 = function(event) {
return;
}
console.log("testMoveBookmarks2");
- chrome.bookmarks.getChildren(0, function(root_children) {
+ chrome.bookmarks.getChildren('0', function(root_children) {
var bookmark_bar = root_children[0]; // bookmarks bar is always first
chrome.bookmarks.getChildren(bookmark_bar.id, function(bar_children) {
var folder_search = [];
@@ -74,7 +74,7 @@ var testMoveBookmarks2 = function(event) {
};
var dumpBookmarks = function(event) {
- window.open("bookmark_view.html");
+ chrome.tabs.create({url:"bookmark_view.html"});
};
</script>
<body>
diff --git a/chrome/test/data/extensions/samples/bookmarks/bookmark_view.html b/chrome/test/data/extensions/samples/bookmarks/bookmark_view.html
index 5275f37..163f2e4 100644
--- a/chrome/test/data/extensions/samples/bookmarks/bookmark_view.html
+++ b/chrome/test/data/extensions/samples/bookmarks/bookmark_view.html
@@ -43,8 +43,8 @@ var logEvent = function(name, id, data) {
console.log("got event: " + name);
}
-chrome.bookmarks.onAdded.addListener(function(id, data) {
- logEvent("onBookmarkAdded", id, data);
+chrome.bookmarks.onCreated.addListener(function(id, data) {
+ logEvent("onBookmarkCreated", id, data);
});
chrome.bookmarks.onRemoved.addListener(function(id, data) {
@@ -71,9 +71,7 @@ var toggleBookmark = function(event) {
var id_str = node.id;
if (id_str < prefix.length)
return;
- var id = parseInt(id_str.substring(prefix.length));
- if (id == NaN)
- return;
+ var id = id_str.substring(prefix.length);
console.log("toggle: " + id);
//console.dir(event);
if (node.childNodes.length > 1) {
@@ -136,7 +134,7 @@ var testGetTree = function(results) {
var loadBookmarks = function() {
var container = document.getElementById('container');
var rootElement = document.createElement("div");
- var rootId = 0;
+ var rootId = '0';
rootElement.id = prefix + rootId;
// root element is empty / invisible, just an id to be looked up
container.appendChild(rootElement);
diff --git a/chrome/test/data/extensions/samples/bookmarks/manifest.json b/chrome/test/data/extensions/samples/bookmarks/manifest.json
index 1580ca7..c6319e8 100644
--- a/chrome/test/data/extensions/samples/bookmarks/manifest.json
+++ b/chrome/test/data/extensions/samples/bookmarks/manifest.json
@@ -2,5 +2,6 @@
"name": "BookmarksAPI",
"description": "Bookmarks API test",
"version": "0.1",
- "toolstrips": ["bookmark_api.html"]
+ "toolstrips": ["bookmark_api.html"],
+ "permissions": ["bookmarks"]
}
diff --git a/chrome/test/data/extensions/samples/mole/manifest.json b/chrome/test/data/extensions/samples/mole/manifest.json
new file mode 100755
index 0000000..f6916ce
--- /dev/null
+++ b/chrome/test/data/extensions/samples/mole/manifest.json
@@ -0,0 +1,7 @@
+{
+ "name": "Mole",
+ "description": "Test animated popup moles",
+ "version": "0.1",
+ "toolstrips": ["mole.html"],
+ "permissions": ["tabs"]
+}
diff --git a/chrome/test/data/extensions/samples/mole/mole.html b/chrome/test/data/extensions/samples/mole/mole.html
new file mode 100755
index 0000000..9efad76
--- /dev/null
+++ b/chrome/test/data/extensions/samples/mole/mole.html
@@ -0,0 +1,67 @@
+<html>
+ <head>
+ <style>
+
+body {
+ -webkit-box-orient:vertical;
+ -webkit-box-direction:normal;
+}
+
+body {
+ width: 100px;
+}
+
+.toolstrip, .toolstrip-content {
+ -webkit-box-orient: horizonal;
+ white-space:nowrap;
+ overflow: hidden;
+ margin:0;
+ padding:0;
+ width: 100%;
+}
+
+.toolstrip {
+ height: 23px;
+ -webkit-box-align: center;
+ border: 1px solid grey;
+}
+
+
+
+.toolstrip-content {
+ -webkit-box-flex: 1;
+ background-color: white;
+ color: black;
+}
+
+ </style>
+ <script>
+var collapsed = true;
+
+function toggle() {
+ if (collapsed) {
+ chrome.toolstrip.expand({ height: 400 }, function() {
+ document.getElementById('content').style.display = "-webkit-box";
+ collapsed = false;
+ });
+ } else {
+ chrome.toolstrip.collapse(undefined, function() {
+ document.getElementById('content').style.display = "none";
+ collapsed = true;
+ });
+ }
+}
+</script>
+ </head>
+ <body>
+
+ <div id="content" style="display:none" class="toolstrip-content">
+ Content
+ </div>
+ <div onclick="toggle();" class="toolstrip">
+ Toolstrip
+ </div>
+
+ </body>
+</html>
+
diff --git a/chrome/test/data/extensions/samples/subscribe_page_action/background.html b/chrome/test/data/extensions/samples/subscribe_page_action/background.html
index 4d14440..e77d2e4 100644
--- a/chrome/test/data/extensions/samples/subscribe_page_action/background.html
+++ b/chrome/test/data/extensions/samples/subscribe_page_action/background.html
@@ -33,9 +33,10 @@
});
// Chrome will call into us when the user clicks on the icon in the OmniBox.
- chrome.pageActions["RssPageAction"].addListener(function(reply) {
+ chrome.pageActions["RssPageAction"].addListener(function(pageActionId,
+ pageActionInfo) {
chrome.windows.getCurrent(function(window) {
- chrome.tabs.get(reply.data.tabId, function(tab) {
+ chrome.tabs.get(pageActionInfo.tabId, function(tab) {
// We need to know if we are the active window, because the tab may
// have moved to another window and we don't want to execute this
// action multiple times.
@@ -43,7 +44,7 @@
// Create a new tab showing the subscription page with the right
// feed URL.
chrome.tabs.create({url: "subscribe.html?" +
- feedData[reply.data.tabId].feedUrl,
+ feedData[pageActionInfo.tabId].feedUrl,
windowId: window.windowId});
}
});
diff --git a/chrome/test/data/extensions/samples/tabs/tabs_api.html b/chrome/test/data/extensions/samples/tabs/tabs_api.html
index cc21232..9b9f519 100644
--- a/chrome/test/data/extensions/samples/tabs/tabs_api.html
+++ b/chrome/test/data/extensions/samples/tabs/tabs_api.html
@@ -24,19 +24,19 @@ function isInt(i) {
}
function loadWindowList() {
- chrome.windows.getAll(true, function(windowList) {
+ chrome.windows.getAll({ populate: true }, function(windowList) {
tabs = {};
tabIds = [];
for (var i = 0; i < windowList.length; i++) {
windowList[i].current = (windowList[i].id == currentWindowId);
windowList[i].focused = (windowList[i].id == focusedWindowId);
-
+
for (var j = 0; j < windowList[i].tabs.length; j++) {
tabIds[tabIds.length] = windowList[i].tabs[j].id;
tabs[windowList[i].tabs[j].id] = windowList[i].tabs[j];
}
- }
-
+ }
+
var input = new JsExprContext(windowList);
var output = document.getElementById('windowList');
jstProcess(input, output);
@@ -139,8 +139,8 @@ function clearLog() {
document.getElementById('log').innerHTML = '';
}
-chrome.windows.onCreated.addListener(function(windowId) {
- appendToLog('windows.onCreated -- window: ' + windowId);
+chrome.windows.onCreated.addListener(function(createInfo) {
+ appendToLog('windows.onCreated -- window: ' + createInfo.id);
loadWindowList();
});
diff --git a/chrome/test/data/extensions/uitest/event_sink/test.html b/chrome/test/data/extensions/uitest/event_sink/test.html
index 5462243..284d8c5 100644
--- a/chrome/test/data/extensions/uitest/event_sink/test.html
+++ b/chrome/test/data/extensions/uitest/event_sink/test.html
@@ -15,7 +15,7 @@ HOLA!!! If you dont see the message DONE, then there is an error in the script.
});
// Window events.
- chrome.windows.onCreated.addListener(function(windowId) {
+ chrome.windows.onCreated.addListener(function(createInfo) {
portToAutomation.postMessage(chrome.windows.onCreated.eventName_);
});
chrome.windows.onRemoved.addListener(function(windowId) {
@@ -49,8 +49,8 @@ HOLA!!! If you dont see the message DONE, then there is an error in the script.
});
// Bookmark events.
- chrome.bookmarks.onAdded.addListener(function(info) {
- portToAutomation.postMessage(chrome.bookmarks.onAdded.eventName_);
+ chrome.bookmarks.onCreated.addListener(function(info) {
+ portToAutomation.postMessage(chrome.bookmarks.onCreated.eventName_);
});
chrome.bookmarks.onRemoved.addListener(function(info) {
portToAutomation.postMessage(chrome.bookmarks.onRemoved.eventName_);
@@ -62,7 +62,7 @@ HOLA!!! If you dont see the message DONE, then there is an error in the script.
portToAutomation.postMessage(chrome.bookmarks.onMoved.eventName_);
});
chrome.bookmarks.onChildrenReordered.addListener(function(bookmarkId,
- children) {
+ reorderInfo) {
portToAutomation.postMessage(
chrome.bookmarks.onChildrenReordered.eventName_);
});