diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 07:17:35 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 07:17:35 +0000 |
commit | 2f3345ff725395b5e8466eb2b4d45e9d8e9024e0 (patch) | |
tree | 1826787800d19277e664558adb43eeb9c998c16b /chrome/common/extensions/docs | |
parent | 8d518af0634a01ff4a78479bef43d880259949ca (diff) | |
download | chromium_src-2f3345ff725395b5e8466eb2b4d45e9d8e9024e0.zip chromium_src-2f3345ff725395b5e8466eb2b4d45e9d8e9024e0.tar.gz chromium_src-2f3345ff725395b5e8466eb2b4d45e9d8e9024e0.tar.bz2 |
Fill out the tabs docs. Also, fix a bug where we didn't
honor #anchors in dynamic mode.
TBR=rafaelw@chromium.org,kathyw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs')
-rwxr-xr-x | chrome/common/extensions/docs/js/bootstrap.js | 9 | ||||
-rwxr-xr-x | chrome/common/extensions/docs/static/bookmarks.html | 2 | ||||
-rwxr-xr-x | chrome/common/extensions/docs/static/tabs.html | 21 | ||||
-rwxr-xr-x | chrome/common/extensions/docs/static/windows.html | 23 |
4 files changed, 48 insertions, 7 deletions
diff --git a/chrome/common/extensions/docs/js/bootstrap.js b/chrome/common/extensions/docs/js/bootstrap.js index 007317f..24bb89c5 100755 --- a/chrome/common/extensions/docs/js/bootstrap.js +++ b/chrome/common/extensions/docs/js/bootstrap.js @@ -18,4 +18,11 @@ window.onload = function() { function postRender() { var elm = document.getElementById("hider"); elm.parentNode.removeChild(elm); -}
\ No newline at end of file + + // Since populating the page is done asynchronously, the DOM doesn't exist + // when the browser tries to resolve any #anchors in the URL. So we reset the + // URL once we're done, which forces the browser to scroll to the anchor as it + // normally would. + if (location.hash.length > 1) + location.href = location.href; +} diff --git a/chrome/common/extensions/docs/static/bookmarks.html b/chrome/common/extensions/docs/static/bookmarks.html index f03c7c2..b9c5101 100755 --- a/chrome/common/extensions/docs/static/bookmarks.html +++ b/chrome/common/extensions/docs/static/bookmarks.html @@ -2,7 +2,7 @@ <!-- BEGIN AUTHORED CONTENT --> <p id="classSummary"> -Use the <code>chrome.bookmarks</code> API to create, organize, +Use the <code>chrome.bookmarks</code> module to create, organize, and otherwise manipulate bookmarks. </p> diff --git a/chrome/common/extensions/docs/static/tabs.html b/chrome/common/extensions/docs/static/tabs.html index 997b579..ba23898 100755 --- a/chrome/common/extensions/docs/static/tabs.html +++ b/chrome/common/extensions/docs/static/tabs.html @@ -1,5 +1,22 @@ +<div id="pageData-title" class="pageData">Tabs</div> + <!-- BEGIN AUTHORED CONTENT --> -<p class="todo"> -[PENDING: API Module Overview Goes Here] +<p id="classSummary"> +Use the <code>chrome.tabs</code> module +to interact with the browser's tab system. +You can use this module to +create, modify, and rearrange tabs in the browser. </p> + +<h2 id="permissions">Permissions</h2> +<p>You must declare the <var>tabs</var> permission in your extension's manifest to use the tabs API.</p> +<p>Example:</p> +<pre>{ + "name": "My extension that uses tabs", + "version": "0.1", +<b> "permissions": [ + "tabs" + ]</b> +}</pre> + <!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/static/windows.html b/chrome/common/extensions/docs/static/windows.html index 997b579..49f5cd1 100755 --- a/chrome/common/extensions/docs/static/windows.html +++ b/chrome/common/extensions/docs/static/windows.html @@ -1,5 +1,22 @@ <!-- BEGIN AUTHORED CONTENT --> -<p class="todo"> -[PENDING: API Module Overview Goes Here] -</p> +<h2 id="current-window">The current window</h2> + +<p>Many functions in the extension system +take an optional <var>windowId</var> parameter +which is documented to default to the <em>current window</em>. + +<p>The current window is the window that +contains the code that is currently executing. +It's important to realize that this can be +different from the topmost or focused window. + +<p>For example, consider code running in a +<a href="toolstrip.html">toolstrip</a>, that +calls <a href="tabs.html#method-getSelected">chrome.tabs.getSelected</a>. +The current window is the window that contains the toolstrip that made +the call, no matter what the topmost window is. + +<p>In the case of the <a href="background_pages.html">background page</a>, +the value of the current window falls back to the topmost window. + <!-- END AUTHORED CONTENT --> |