| 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 mecha
nism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is gener
eated 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>.innerHTM
L is also generated by an offline step so that this page may easily be indexed b
y search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes t
he single version of page template shell and the "instance" pages (bookmarks.htm
l, etc...) can be generated with a build step. --><!-- <html> must retain id="te
mplate --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> da
ta 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 hr
ef="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_gen
erator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstr
ap.js" jstcache="0"></script> </head><!-- <body> content is completely generated
. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="cont
ainer" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div i
d="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="htt
p://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <in
put 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.goo
gle.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&t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src
="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en" jstcache
="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTi
tle()" jstcache="1">Page Actions</h1> </div> </div> <!-- /pageHeader --> <div id
="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <u
l 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" js
tcache="0">Toolstrips</a></li> <li jstcache="0" class="leftNavSelected">Page Act
ions</li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Backgrou
nd Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">C
ontent Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="t
abs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jst
cache="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="npap
i.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> </l
i> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tuto
rials</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 jstca
che="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="m
anifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patter
ns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a h
ref="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> <di
v id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdispl
ay="showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0">
<li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" j
svalues=".href:'#' + href" jstcache="14" href="#H2-0">User interface</a> <ol jst
cache="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="di
splay: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3
Name</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" jsins
tance="*0" style="display: none; "> <a jscontent="name" jsvalues=".href:'#' + hr
ef" jstcache="14">h3Name</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstc
ache="9" jsinstance="*2"> <a jscontent="name" jsvalues=".href:'#' + href" jstcac
he="14" href="#H2-2">Events</a> <ol jstcache="0"> <li jsselect="$this.children"
jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name" jsval
ues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li> <div jsselect=
"apiDefinition" jstcache="3"> <li jstcache="0"> <a href="#apiReference" jsconten
t="'API Reference: ' + getModuleName()" jstcache="23">API Reference: chrome.page
Actions</a> <ol jstcache="0"> <li jsdisplay="$this.properties" jstcache="5" styl
e="display: none; "> <a href="#properties" jstcache="0">Properties</a> <ol jstca
che="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscon
tent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcach
e="42">propertyName</a> </li> </ol> </li> <li jsdisplay="functions && fu
nctions.length > 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a>
<ol jstcache="0"> <li jsselect="functions" jstcache="11" jsinstance="0"> <a jsc
ontent="name" jsvalues=".href:'#method-' + name" href="#method-enableForTab" jst
cache="43">enableForTab</a> </li><li jsselect="functions" jstcache="11" jsinstan
ce="*1"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-di
sableForTab" jstcache="43">disableForTab</a> </li> </ol> </li> <li jsdisplay="ev
ents && events.length > 0" jstcache="7" style="display: none; "> <a h
ref="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="events" js
tcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href="#event-
anchor" jstcache="44">eventName</a> </li> </ol> </li> <li jsdisplay="types &
& types.length > 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 AUTH
ORED CONTENT --> <p jstcache="0">Page actions are a simple way to represent acti
ons 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 jst
cache="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 d
eclare page actions in the manifest using the following syntax:</p> <pre jstcach
e="0">"page_actions": [ { "id": "myaction", // Chosen by the developer. Should b
e unique within their extension. "name": "Do action", // The page action name, a
lso used as tooltip (unless overridden). "icons": ["favicon.png", "favicon2.png"
] } ]</pre> <p jstcache="0">Supported icon image formats include for example: pn
g, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be re
sized to fit. For optimal performance, consider using an image that does not hav
e to be resized to fit.</p> <a name="H2-2" jstcache="0"></a><h2 jstcache="0">Eve
nts</h2> <p jstcache="0">Each page action displays an icon in the OmniBox. Whene
ver 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">Pag
e 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 c
alled 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:25
px;" 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; An object containing the information about the event. Contains
the following properties:</p> <p style="margin-left:50px;" jstcache="0"><i jstca
che="0">pageActionId ( string )</i><br jstcache="0"> The id of
the page action that triggered the event.</p> <p style="margin-left:50px;" jstc
ache="0"><i jstcache="0">data ( object )</i><br jstcache="0">
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"> The id of the tab th
at was active when the event was triggered.</p> <p style="margin-left:75px;" jst
cache="0"><i jstcache="0">tabUrl ( string )</i><br jstcache="0"> &nb
sp;The url of the page for which the page action applies to.</p> <!-- END AUTHOR
ED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefini
tion" jstcache="3"> <a name="apiReference" jstcache="0"></a> <h2 jscontent="getM
oduleName() + ' API reference'" jstcache="4">chrome.pageActions API reference</h
2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGroup" jstcac
he="5" style="display: none; "> <a name="properties" jstcache="0"></a> <h3 id="p
roperties" 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" jstc
ache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getMod
uleName() + '.'" jstcache="24">chrome.extension</span><span jscontent="$this.nam
e" jstcache="25">lastError</span> </div> <div transclude="valueTemplate" jstcach
e="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay=
"functions && functions.length > 0" class="apiGroup" id="methods" jst
cache="6"> <a name="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-
- iterates over all functions --> <div class="apiItem" jsselect="functions" jstc
ache="11" jsinstance="0"> <a jsvalues=".name:'method-' + name" jstcache="18" nam
e="method-enableForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcach
e="16">enableForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="retu
rns" jscontent="getTypeName(returns)" jstcache="26" style="display: none; ">void
</span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFully
QualifiedFunctionName($this)" jstcache="27">chrome.pageActions.enableForTab</spa
n>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstca
che="28" jsinstance="0" class="null"><span jsdisplay="$index" jstcache="34" styl
e="display: none; ">, </span><span jscontent="getTypeName($this)" jstcache="35">
string</span> <var jstcache="0"><span jscontent="name" jstcache="16">pageActionI
d</span></var></span><span jsselect="parameters" jsvalues="class:optional ? 'opt
ional' : ''" jstcache="28" jsinstance="*1" class=""><span jsdisplay="$index" jst
cache="34">, </span><span jscontent="getTypeName($this)" jstcache="35">object</s
pan> <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 jsdispl
ay="description" jsvalues=".innerHTML:description" jstcache="30">Enables a page
action for a particular tab+url combination (makes its icon visible in the OmniB
ox when a certain url is active in a given tab). The page action will automatica
lly be disabled (its icon hidden) if the user navigates to a new URL or closes t
he tab. The action will also automatically be enabled/disabled as the user switc
hes tabs.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache=
"0"> <div jsselect="parameters" jstcache="36" jsinstance="0"> <!-- VALUE: This i
s a subtemplate that is used elsewhere via jsTemplate *transclude* --> <div id="
valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscon
tent="$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="typeT
emplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="
display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getType
Ref($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span
jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" j
stcache="51" style="display: none; "> array of <span jsselect="items" jstcache="
53"><span transclude="typeTemplate" jstcache="54"></span></span> </span> <span j
sdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="52">string</
span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.de
scription" jstcache="39" style="display: none; "> Undocumented. </dd> <dd jsdisp
lay="$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 PRO
PERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="displ
ay: 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" js
instance="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTe
mplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0">
<var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">action</var> <e
m jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span
class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">opti
onal</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($t
his)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage(
$this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="5
0"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span j
sdisplay="isArray($this)" jstcache="51" style="display: none; "> array of <span
jsselect="items" jstcache="53"><span transclude="typeTemplate" jstcache="54"></s
pan></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($th
is)" jstcache="52">object</span> </span> </span> ) </div> </em> </dt> <dd class=
"todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Und
ocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.de
scription" jstcache="40">An object specifing what action should be applied to th
e page action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --
> <dd jsdisplay="shouldExpandObject($this)" jstcache="41"> <dl jstcache="0"> <di
v jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div
jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.na
me" jstcache="46">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="displa
y: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="!getTypeRe
f($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" style="d
isplay: none; "> array of <span jsselect="items" jstcache="53"><span transclude=
"typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArray($t
his)" 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.descripti
on" jsvalues=".innerHTML:$this.description" jstcache="40">The id of the tab for
which you want to enable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd js
display="shouldExpandObject($this)" jstcache="41" style="display: none; "> <dl j
stcache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <di
v transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </d
iv><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1"
> <div jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$t
his.name" jstcache="46">url</var> <em jstcache="0"> <!-- TYPE --> <div style="di
splay:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcac
he="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)" jscon
tent="getTypeRef($this)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTy
peRef($this)" jstcache="49"> <span jsdisplay="isArray($this)" jstcache="51" styl
e="display: none; "> array of <span jsselect="items" jstcache="53"><span transcl
ude="typeTemplate" jstcache="54"></span></span> </span> <span jsdisplay="!isArra
y($this)" jscontent="getTypeName($this)" jstcache="52">string</span> </span> </s
pan> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcac
he="39" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.descri
ption" 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 c
urrently navigated URL (user has navigated to another page) then no action is ta
ken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" j
stcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getProper
tyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache
="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFrom
Object($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> <s
pan id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache
="48" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#typ
e-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type</a> <
/span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdisplay="isAr
ray($this)" jstcache="51" style="display: none; "> array of <span jsselect="item
s" 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" jsdispl
ay="!$this.description" jstcache="39" style="display: none; "> Undocumented. </d
d> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jst
cache="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="getPrope
rtyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcach
e="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFro
mObject($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"> ( <s
pan class="optional" jsdisplay="optional" jstcache="47" style="">optional</span>
<span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstca
che="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="i
sArray($this)" jstcache="51" style="display: none; "> array of <span jsselect="i
tems" jstcache="53"><span transclude="typeTemplate" jstcache="54"></span></span>
</span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcac
he="52">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsd
isplay="!$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 manif
est. 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 pa
ge action states. Example: An RSS feed icon could have a 'subscribe now' icon an
d an 'already subscribed' icon.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="s
houldExpandObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0
"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclu
de="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div> </dl>
</dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="return
s" jstcache="31" style="display: none; ">Returns</h4> <dl jstcache="0"> <div jss
elect="returns" jstcache="37" style="display: none; "> <div transclude="valueTem
plate" 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 func
tion</h4> <p jstcache="0"> If you specify the <em jstcache="0">callback</em> par
ameter, it should specify a function that looks like this: </p> <!-- Note: inten
tionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSi
gnatureString(parameters)" jstcache="33">Type param1, Type param2</span>) <span
class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselec
t="parameters" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> </d
iv> </div> </dl> </div> </div> </div> <!-- /description --> </div><div class="ap
iItem" jsselect="functions" jstcache="11" jsinstance="*1"> <a jsvalues=".name:'m
ethod-' + name" jstcache="18" name="method-disableForTab"></a> <!-- method-ancho
r --> <h4 jscontent="name" jstcache="16">disableForTab</h4> <div class="summary"
jstcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcach
e="26" style="display: none; ">void</span> <!-- Note: intentionally longer 80 co
lumns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="27">c
hrome.pageActions.disableForTab</span>(<span jsselect="parameters" jsvalues="cla
ss:optional ? 'optional' : ''" jstcache="28" jsinstance="0" class="null"><span j
sdisplay="$index" jstcache="34" style="display: none; ">, </span><span jscontent
="getTypeName($this)" jstcache="35">string</span> <var jstcache="0"><span jscont
ent="name" jstcache="16">pageActionId</span></var></span><span jsselect="paramet
ers" jsvalues="class:optional ? 'optional' : ''" jstcache="28" jsinstance="*1" c
lass=""><span jsdisplay="$index" jstcache="34">, </span><span jscontent="getType
Name($this)" jstcache="35">object</span> <var jstcache="0"><span jscontent="name
" jstcache="16">action</span></var></span>)</div> <div class="description" jstca
che="0"> <p class="todo" jsdisplay="!description" jstcache="29" style="display:
none; ">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:descri
ption" 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 gi
ven 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" jstcac
he="36" jsinstance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere
via jsTemplate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstca
che="0"> <var jsdisplay="$this.name" jscontent="$this.name" jstcache="46">pageAc
tionId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:inline" jstcach
e="0"> ( <span class="optional" jsdisplay="optional" jstcache="47" style="displa
y: 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($thi
s)" jstcache="50"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcach
e="49"> <span jsdisplay="isArray($this)" jstcache="51" style="display: none; ">
array of <span jsselect="items" jstcache="53"><span transclude="typeTemplate" js
tcache="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="displa
y: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".inn
erHTML:$this.description" jstcache="40">An extension can have multiple page acti
ons specified in the manifest, each with a unique identifier. This string identi
fies which page action you want to disable (and must match a page action id decl
ared in the manifest).</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpa
ndObject($this)" jstcache="41" style="display: none; "> <dl jstcache="0"> <div j
sselect="getPropertyListFromObject($this)" jstcache="10"> <div transclude="value
Template" 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="valu
eTemplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent
="$this.name" jstcache="46">action</var> <em jstcache="0"> <!-- TYPE --> <div st
yle="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional"
jstcache="47" style="display: none; ">optional</span> <span id="typeTemplate" j
stcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="48" style="display: n
one; "> <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="5
1" 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> </sp
an> </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 sp
ecifying what action should be applied to the page action. Contains the followin
g properties:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject(
$this)" jstcache="41"> <dl jstcache="0"> <div jsselect="getPropertyListFromObjec
t($this)" jstcache="10" jsinstance="0"> <div jstcache="0"> <dt jstcache="0"> <va
r jsdisplay="$this.name" jscontent="$this.name" jstcache="46">tabId</var> <em js
tcache="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span clas
s="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($thi
s) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50">
Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="49"> <span jsdis
play="isArray($this)" jstcache="51" style="display: none; "> array of <span jsse
lect="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="to
do" jsdisplay="!$this.description" jstcache="39" style="display: none; "> Undocu
mented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.descr
iption" jstcache="40">The id of the tab for which you want to disable the page a
ction.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)"
jstcache="41" style="display: none; "> <dl jstcache="0"> <div jsselect="getProp
ertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcac
he="17"> </div> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFr
omObject($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"> ( <spa
n class="optional" jsdisplay="optional" jstcache="47" style="display: none; ">op
tional</span> <span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef(
$this)" jstcache="48" style="display: none; "> <a jsvalues=".href: getTypeRefPag
e($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 <spa
n 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 clas
s="todo" jsdisplay="!$this.description" jstcache="39" style="display: none; "> U
ndocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.
description" jstcache="40">The URL of the page you want the page action to not a
pply to. If the URL specified does not match the currently navigated URL (user h
as navigated to another page) then no action is taken.</dd> <!-- OBJECT PROPERTI
ES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="41" style="display: n
one; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstca
che="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </d
d> </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; "> <d
iv transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK -
-> <div jsdisplay="hasCallback(parameters)" jstcache="32" style="display:
none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="38"> <h4 js
tcache="0">Callback function</h4> <p jstcache="0"> If you specify the <em jstcac
he="0">callback</em> parameter, it should specify a function that looks like thi
s: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">functio
n(<span jscontent="getSignatureString(parameters)" jstcache="33">Type param1, Ty
pe param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl js
tcache="0"> <div jsselect="parameters" jstcache="36"> <div transclude="valueTemp
late" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description
--> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdi
splay="events && events.length > 0" class="apiGroup" jstcache="7" sty
le="display: none; "> <a name="events" jstcache="0"></a> <h3 id="events" jstcach
e="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" jstcach
e="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModule
Name() + '.'" class="subdued" jstcache="24">chrome.bookmarks</span><span jsconte
nt="name" jstcache="16">onEvent</span><span class="subdued" jstcache="0">.addLis
tener</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" jsvalu
es=".innerHTML:description" jstcache="30"> A description from the json schema de
f 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 && types.length > 0" class="apiGroup" jstcache="8" style="disp
lay: none; "> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Type
s</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" js
tcache="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> | 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 mecha
nism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is gener
eated 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>.innerHTM
L is also generated by an offline step so that this page may easily be indexed b
y search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes t
he single version of page template shell and the "instance" pages (bookmarks.htm
l, etc...) can be generated with a build step. --><!-- <html> must retain id="te
mplate --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> da
ta 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 hr
ef="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_gen
erator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstr
ap.js" jstcache="0"></script> </head><!-- <body> content is completely generated
. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="cont
ainer" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div i
d="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="htt
p://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <in
put 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.goo
gle.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&t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src
="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en" jstcache
="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTi
tle()" jstcache="1">Page Actions</h1> </div> </div> <!-- /pageHeader --> <div id
="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <u
l 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" js
tcache="0">Toolstrips</a></li> <li jstcache="0" class="leftNavSelected">Page Act
ions</li> <li jstcache="0"><a href="background_pages.html" jstcache="0">Backgrou
nd Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">C
ontent Scripts</a></li> <li jstcache="0">Events</li> <li jstcache="0"><a href="t
abs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="windows.html" jst
cache="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="npap
i.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> </l
i> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache="0">Tuto
rials</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 jstca
che="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0"><a href="m
anifest.html" jstcache="0">Manifest Files</a></li> <li jstcache="0">Match Patter
ns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li jstcache="0"> <a h
ref="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li jstcache="0"> <a h
ref="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache=
"0"><a href="http://dev.chromium.org/developers/design-documents/extensions/samp
les" 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" js
tcache="14" href="#H2-0">Manifest</a> <ol jstcache="0"> <li jsselect="$this.chil
dren" jstcache="22" jsinstance="*0" style="display: none; "> <a jscontent="name"
jsvalues=".href:'#' + href" jstcache="14">h3Name</a> </li> </ol> </li><li jssel
ect="getStaticTOC()" jstcache="9" jsinstance="*1"> <a jscontent="name" jsvalues=
".href:'#' + href" jstcache="14" href="#H2-1">Events</a> <ol jstcache="0"> <li j
sselect="$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">AP
I reference: chrome.pageActions</a> <ol jstcache="0"> <li jsdisplay="$this.prope
rties" 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 && functions.length > 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 && events.length > 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> <l
i jsdisplay="types && types.length > 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="#i
d-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 Actio
ns</div> <!-- BEGIN AUTHORED CONTENT --> <p jstcache="0">Page actions are a simp
le way to represent actions that can be taken on a page ("Email this page", "Sha
re with Facebook", etc).</p> <p jstcache="0"> Page actions are displayed as icon
s on the right side of the OmniBox. The RSS icon in the following screenshot rep
resents a page action that lets you subscribe to the RSS feed for the current pa
ge. </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 foll
owing syntax:</p> <pre jstcache="0">"page_actions": [ { "id": "myaction", // Cho
sen by the developer. Should be unique within their extension. "name": "Do actio
n", // The page action name, also used as tooltip (unless overridden). "icons":
["favicon.png", "favicon2.png"] } ]</pre> <p jstcache="0">Supported icon image f
ormats include for example: png, bmp, ico, jpg, gif. If an image larger than 16x
16 is specified, it will be resized to fit. For optimal performance, consider us
ing an image that does not have to be resized to fit.</p> <a name="H2-1" jstcach
e="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 t
he extension, signifying that the user wants to apply an action to the current p
age. To receive notifications about the event, the extension must register a lis
tener.</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 woul
d then register listeners like so:</p> <pre jstcache="0">chrome.pageActions["foo
"].addListener(function(object reply) { console.log(reply.pageActionId); // Disp
lay 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.tabUr
l); // 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 ( o
bject )</i><br jstcache="0"> An object containing the informat
ion about the event. Contains the following properties:</p> <p style="margin-lef
t:50px;" jstcache="0"><i jstcache="0">pageActionId ( string )</i><br jstcache="0
"> 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 js
tcache="0"> An object specifying what tab and which page the e
vent applies to. Contains the following properties:</p> <p style="margin-left:75
px;" jstcache="0"><i jstcache="0">tabId ( string )</i><br jstcache="0"> &n
bsp; 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"> The url of the page for which the page action a
pplies to.</p> <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class
="apiPage" jsselect="apiDefinition" jstcache="3"> <a name="apiReference" jstcach
e="0"></a> <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API
reference: chrome.pageActions</h2> <!-- PROPERTIES --> <div jsdisplay="$this.pro
perties" class="apiGroup" jstcache="5" style="display: none; "> <a name="propert
ies" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jss
elect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:'prop
erty-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLastErro
r</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 col
umns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extension<
/span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <div tr
ansclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup -->
<!-- METHODS --> <div jsdisplay="functions && functions.length > 0" c
lass="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></a> <
h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="ap
iItem" jsselect="functions" jstcache="11" jsinstance="0"> <a jsvalues=".name:'me
thod-' + name" jstcache="18" name="method-enableForTab"></a> <!-- method-anchor
--> <h4 jscontent="name" jstcache="16">enableForTab</h4> <div class="summary" js
tcache="0"><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="
25" style="display: none; ">void</span> <!-- Note: intentionally longer 80 colum
ns --> <span jscontent="getFullyQualifiedFunctionName($this)" jstcache="26">chro
me.pageActions.enableForTab</span>(<span jsselect="parameters" jsvalues="class:o
ptional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"><span jsdis
play="$index" jstcache="33" style="display: none; ">, </span><span jscontent="ge
tTypeName($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" js
tcache="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:descriptio
n" jstcache="29">Enables a page action for a particular tab+url combination (mak
es 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 na
vigates to a new URL or closes the tab. The action will also automatically be en
abled/disabled as the user switches tabs.</p> <!-- PARAMETERS --> <h4 jstcache="
0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" js
instance="0"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTem
plate *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <
var jsdisplay="$this.name" jscontent="$this.name" jstcache="45">pageActionId</va
r> <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="getTypeR
ef($this)" jstcache="47" style="display: none; "> <a jsvalues=".href: getTypeRef
Page($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcac
he="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <s
pan 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="getTypeNam
e($this)" jstcache="51">string</span> </span> </span> ) </div> </em> </dt> <dd c
lass="todo" jsdisplay="!$this.description" jstcache="38" style="display: none; "
> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th
is.description" jstcache="39">An extension can have multiple page actions specif
ied 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($t
his)" jstcache="40" style="display: none; "> <dl jstcache="0"> <div jsselect="ge
tPropertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" j
stcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div><div jssele
ct="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.nam
e" jstcache="45">action</var> <em jstcache="0"> <!-- TYPE --> <div style="displa
y: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="!getTypeRe
f($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="d
isplay: none; "> array of <span jsselect="items" jstcache="52"><span transclude=
"typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($t
his)" 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.descriptio
n" jsvalues=".innerHTML:$this.description" jstcache="39">An object specifing wha
t action should be applied to the page action. Contains the following properties
:</dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstc
ache="40"> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" js
tcache="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> <spa
n 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> </s
pan> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArra
y($this)" jstcache="50" style="display: none; "> array of <span jsselect="items"
jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span> </sp
an> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcache="5
1">integer</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdispla
y="!$this.description" jstcache="38" style="display: none; "> Undocumented. </dd
> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" jstc
ache="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="getPropertyListFromO
bject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </di
v> </div> </dl> </dd> </div> </div><div jsselect="getPropertyListFromObject($thi
s)" jstcache="10" jsinstance="1"> <div jstcache="0"> <dt jstcache="0"> <var jsdi
splay="$this.name" jscontent="$this.name" jstcache="45">url</var> <em jstcache="
0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="optio
nal" jsdisplay="optional" jstcache="46" style="display: none; ">optional</span>
<span id="typeTemplate" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcac
he="47" style="display: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#t
ype-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Type</a>
</span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="is
Array($this)" jstcache="50" style="display: none; "> array of <span jsselect="it
ems" jstcache="52"><span transclude="typeTemplate" jstcache="53"></span></span>
</span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this)" jstcach
e="51">string</span> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdis
play="!$this.description" jstcache="38" style="display: none; "> Undocumented. <
/dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.description" j
stcache="39">The URL of the page you want the page action to apply to. If the UR
L specified does not match the currently navigated URL (user has navigated to an
other page) then no action is taken.</dd> <!-- OBJECT PROPERTIES --> <dd jsdispl
ay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstcac
he="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div tra
nsclude="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> </div><d
iv jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2"> <di
v jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.n
ame" jstcache="45">title</var> <em jstcache="0"> <!-- TYPE --> <div style="displ
ay:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache=
"46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdisp
lay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".hre
f: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($
this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstc
ache="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)" jsconten
t="getTypeName($this)" jstcache="51">string</span> </span> </span> ) </div> </em
> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache="38" style="dis
play: none; "> Undocumented. </dd> <dd jsdisplay="$this.description" jsvalues=".
innerHTML:$this.description" jstcache="39">Specifying |title| allows you to chan
ge the tooltip that appears when you hover over the page action icon in the Omni
Box. This parameter is optional and if omitted then the page action |name| prope
rty declared in the manifest is used.</dd> <!-- OBJECT PROPERTIES --> <dd jsdisp
lay="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstca
che="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div tr
ansclude="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="di
splay:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcac
he="46" style="">optional</span> <span id="typeTemplate" jstcache="0"> <span jsd
isplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsvalues=".
href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRe
f($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" j
stcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="display: non
e; "> array of <span jsselect="items" jstcache="52"><span transclude="typeTempla
te" jstcache="53"></span></span> </span> <span jsdisplay="!isArray($this)" jscon
tent="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" jsvalue
s=".innerHTML:$this.description" jstcache="39">A zero-based index into the |icon
s| vector specified in the manifest. This parameter is optional and if omitted t
hen 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 coul
d have a 'subscribe now' icon and an 'already subscribed' icon.</dd> <!-- OBJECT
PROPERTIES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="d
isplay: none; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($thi
s)" jstcache="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div>
</dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- R
ETURNS --> <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Returns
</h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36" style="display: no
ne; "> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> <!-- C
ALLBACK --> <div jsdisplay="hasCallback(parameters)" jstcache="31" style="d
isplay: none; "> <div jsselect="getCallbackParameters(parameters)" jstcache="37"
> <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <e
m 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 pa
ram1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre
> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="v
alueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /desc
ription --> </div><div class="apiItem" jsselect="functions" jstcache="11" jsinst
ance="*1"> <a jsvalues=".name:'method-' + name" jstcache="18" name="method-disab
leForTab"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16">disable
ForTab</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" jsconten
t="getTypeName(returns)" jstcache="25" style="display: none; ">void</span> <!--
Note: intentionally longer 80 columns --> <span jscontent="getFullyQualifiedFunc
tionName($this)" jstcache="26">chrome.pageActions.disableForTab</span>(<span jss
elect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27" jsi
nstance="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></va
r></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 js
tcache="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="descript
ion" 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 a
ction before the user navigates away from a page containing an enabled page acti
on.</p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache="0"> <
div jsselect="parameters" jstcache="35" jsinstance="0"> <!-- VALUE: This is a su
btemplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueT
emplate" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="
$this.name" jstcache="45">pageActionId</var> <em jstcache="0"> <!-- TYPE --> <di
v style="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optio
nal" jstcache="46" style="display: none; ">optional</span> <span id="typeTemplat
e" jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47" style="displa
y: none; "> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($t
his)" jscontent="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisp
lay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcach
e="50" style="display: none; "> array of <span jsselect="items" jstcache="52"><s
pan transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdispl
ay="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">string</span>
</span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.descript
ion" jstcache="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$
this.description" jsvalues=".innerHTML:$this.description" jstcache="39">An exten
sion can have multiple page actions specified in the manifest, each with a uniqu
e identifier. This string identifies which page action you want to disable (and
must match a page action id declared in the manifest).</dd> <!-- OBJECT PROPERTI
ES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40" style="display: n
one; "> <dl jstcache="0"> <div jsselect="getPropertyListFromObject($this)" jstca
che="10"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </d
d> </div> <!-- /VALUE --> </div><div jsselect="parameters" jstcache="35" jsinsta
nce="*1"> <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplat
e *transclude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var
jsdisplay="$this.name" jscontent="$this.name" jstcache="45">action</var> <em jst
cache="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"> T
ype</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisp
lay="isArray($this)" jstcache="50" style="display: none; "> array of <span jssel
ect="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; "> Undocume
nted. </dd> <dd jsdisplay="$this.description" jsvalues=".innerHTML:$this.descrip
tion" jstcache="39">An object specifying what action should be applied to the pa
ge action. Contains the following properties:</dd> <!-- OBJECT PROPERTIES --> <d
d jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div js
select="getPropertyListFromObject($this)" jstcache="10" jsinstance="0"> <div jst
cache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$this.name"
jstcache="45">tabId</var> <em jstcache="0"> <!-- TYPE --> <div style="display:in
line" jstcache="0"> ( <span class="optional" jsdisplay="optional" jstcache="46"
style="display: none; ">optional</span> <span id="typeTemplate" jstcache="0"> <s
pan jsdisplay="getTypeRef($this)" jstcache="47" style="display: none; "> <a jsva
lues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="ge
tTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($t
his)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style="displ
ay: none; "> array of <span jsselect="items" jstcache="52"><span transclude="typ
eTemplate" 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 whic
h you want to disable the page action.</dd> <!-- OBJECT PROPERTIES --> <dd jsdis
play="shouldExpandObject($this)" jstcache="40" style="display: none; "> <dl jstc
ache="0"> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div t
ransclude="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="$thi
s.name" jstcache="45">url</var> <em jstcache="0"> <!-- TYPE --> <div style="disp
lay: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)" jsconte
nt="getTypeRef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getType
Ref($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50" style=
"display: none; "> array of <span jsselect="items" jstcache="52"><span transclud
e="typeTemplate" jstcache="53"></span></span> </span> <span jsdisplay="!isArray(
$this)" jscontent="getTypeName($this)" jstcache="51">string</span> </span> </spa
n> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.description" jstcache
="38" style="display: none; "> Undocumented. </dd> <dd jsdisplay="$this.descript
ion" jsvalues=".innerHTML:$this.description" jstcache="39">The URL of the page y
ou 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="getProp
ertyListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcac
he="17"> </div> </div> </dl> </dd> </div> </div> </dl> </dd> </div> <!-- /VALUE
--> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30" style="d
isplay: none; ">Returns</h4> <dl jstcache="0"> <div jsselect="returns" jstcache=
"36" style="display: none; "> <div transclude="valueTemplate" jstcache="17"> </d
iv> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters)
" jstcache="31" style="display: none; "> <div jsselect="getCallbackParameters(pa
rameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jstcache="0
"> If you specify the <em jstcache="0">callback</em> parameter, it should specif
y a function that looks like this: </p> <!-- Note: intentionally longer 80 colum
ns --> <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> <!-- /apiGro
up --> <!-- EVENTS --> <div jsdisplay="events && events.length > 0" c
lass="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:'ev
ent-' + name" jstcache="19"></a> <h4 jscontent="name" jstcache="16">event name</
h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 column
s --> <span jscontent="getModuleName() + '.'" class="subdued" jstcache="23">chro
me.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span><span clas
s="subdued" jstcache="0">.addListener</span>(function(<span jscontent="getSignat
ureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span clas
s="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 des
cription 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> </d
l> </div> <!-- /decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --
> <!-- TYPES --> <div jsdisplay="types && types.length > 0" class="ap
iGroup" jstcache="8" style="display: none; "> <a name="types" jstcache="0"></a>
<h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jss
elect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" js
tcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div transclude
="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> <!-- /api
Group --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <!-- /page
Content --> <div id="pageFooter" --="" jstcache="0"> Copyright 2009. For terms o
f use, see the Chromium <a href="http://src.chromium.org/viewvc/chrome/trunk/src
/LICENSE" jstcache="0">license</a>. </div> <!-- /pageFooter --> </div> <!-- /con
tainer --> </body></html> |