Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: chrome/common/extensions/docs/pageActions.html

Issue 179068: Extension Doc Changes (no building or testable changes): minor changes for tab & windows doc (Closed)
Patch Set: touch grd. rendered docs Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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&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="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 &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> <l i 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="#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"> &nbsp;&nbsp;&nbsp;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 "> &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 js tcache="0"> &nbsp;&nbsp;&nbsp;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"> &nbsp;&n bsp;&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 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 &amp;&amp; functions.length &gt; 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 &amp;&amp; events.length &gt; 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 &amp;&amp; types.length &gt; 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"> <p jstcache="0"> Except as otherwise <a href="http://code.google.com/policies.html#restrictions" jstcache=" 0">noted</a>, the content of this page is licensed under the <a rel="license" hr ef="http://creativecommons.org/licenses/by/3.0/" jstcache="0">Creative Commons A ttribution 3.0 License</a>, and code samples are licensed under the <a rel="lice nse" href="http://code.google.com/google_bsd_license.html" jstcache="0">BSD Lice nse</a>. </p> <p jstcache="0"> ©2009 Google </p> </div> <!-- /pageFooter --> </d iv> <!-- /container --> </body></html> 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the
4 templating mechanism.
5 2) The <body> tag *must* retain id="body"
6 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
7 browser, it will be re-generated from the template, json schema and
8 authored overview content.
9 4) The <body>.innerHTML is also generated by an offline step so that this
10 page may easily be indexed by search engines.
11
12 TODO(rafaelw): Abstract this into a "pageshell" that becomes the single
13 version of page template shell and the "instance" pages (bookmarks.html,
14 etc...) can be generated with a build step.
15 --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/x html" jstcache="0"><!-- <head> data is significant and loads the needed librarie s and styles --><head jstcache="0">
16 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache= "0">
17 <title jscontent="getPageTitle()" jstcache="1">Page Actions</title>
18 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache= "0">
19 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js" jstcache="0">
20 </script>
21 <script type="text/javascript" src="js/api_page_generator.js" jstcache="0">< /script>
22 <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script>
23 </head><!-- <body> content is completely generated. Do not edit, as it will be
24 and rewritten. --><body jstcache="0"> <div id="container" jstcache="0">
25 <a name="top" jstcache="0"> </a>
26 <!-- API HEADER -->
27 <div id="pageHeader" jstcache="0">
28 <div id="searchbox" jstcache="0">
29 <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0 ">
30 <div jstcache="0">
31 <input type="hidden" name="cx" value="002967670403910741006:61_cvzfq tno" jstcache="0">
32 <input type="hidden" name="ie" value="UTF-8" jstcache="0">
33 <input type="text" name="q" size="31" jstcache="0">
34 <input type="submit" name="sa" value="Search" jstcache="0">
35 </div>
36 </form>
37
38 <script type="text/javascript" src="http://www.google.com/jsapi" jstcach e="0"></script>
39 <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script>
40 <script type="text/javascript" src="http://www.google.com/coop/cse/t13n? form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script>
41 <script type="text/javascript" src="http://www.google.com/coop/cse/brand ?form=cse-search-box&amp;lang=en" jstcache="0"></script>
42 </div>
43 <div id="pageTitle" jstcache="0">
44 <h1 jscontent="getPageTitle()" jstcache="1">Page Actions</h1>
45 </div>
46 </div> <!-- /pageHeader -->
47
48 <div id="pageContent" jstcache="0">
49 <!-- SIDENAV -->
50 <div id="leftNav" jstcache="0">
51 <ul jstcache="0">
52 <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li>
53 <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Start ed</a></li>
54 <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></l i>
55 <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache=" 0">Developer's Guide</div></a>
56 <ul jstcache="0">
57 <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips< /a></li>
58 <li jstcache="0" class="leftNavSelected">Page Actions</li>
59 <li jstcache="0"><a href="background_pages.html" jstcache="0">Back ground Pages</a></li>
60 <li jstcache="0"><a href="content_scripts.html" jstcache="0">Conte nt Scripts</a></li>
61 <li jstcache="0"><a href="events.html" jstcache="0">Events</a></li >
62 <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li>
63 <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></ li>
64 <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</ a></li>
65 <li jstcache="0"><a href="themes.html" jstcache="0">Themes</a></li >
66 <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</ a></li>
67 <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</ a></li>
68 <li jstcache="0">Autoupdate</li>
69 </ul>
70 </li>
71 <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache=" 0">Tutorials</div></a>
72 <ul jstcache="0">
73 <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debuggi ng</a></li>
74 </ul>
75 </li>
76 <li jstcache="0">Reference
77 <ul jstcache="0">
78 <li jstcache="0"> Formats
79 <ul jstcache="0">
80 <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li>
81 <li jstcache="0"><a href="match_patterns.html" jstcache="0">Ma tch Patterns</a></li>
82 <li jstcache="0">Packages (.crx)</li>
83 </ul>
84 </li>
85 <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* A PIs</a> </li>
86 <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs </a> </li>
87 </ul>
88 </li>
89 <li jstcache="0"><a href="http://dev.chromium.org/developers/design-doc uments/extensions/samples" jstcache="0">Samples</a></li>
90 </ul>
91 </div>
92
93 <div id="mainColumn" jstcache="0">
94 <!-- TABLE OF CONTENTS -->
95 <div id="toc" jsdisplay="showPageTOC()" jstcache="2">
96 <p jstcache="0">Contents</p>
97 <ol jstcache="0">
98 <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0">
99 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href ="#manifest">Manifest</a>
100 <ol jstcache="0">
101 <li jsselect="$this.children" jstcache="22" jsinstance="*0" styl e="display: none; ">
102 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14"> h3Name</a>
103 </li>
104 </ol>
105 </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*1">
106 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href ="#H2-1">Events</a>
107 <ol jstcache="0">
108 <li jsselect="$this.children" jstcache="22" jsinstance="*0" styl e="display: none; ">
109 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14"> h3Name</a>
110 </li>
111 </ol>
112 </li>
113 <div jsselect="apiDefinition" jstcache="3">
114 <li jstcache="0">
115 <a href="#apiReference" jscontent="'API reference: ' + getModule Name()" jstcache="4">API reference: chrome.pageActions</a>
116 <ol jstcache="0">
117 <li jsdisplay="$this.properties" jstcache="5" style="display: none; ">
118 <a href="#properties" jstcache="0">Properties</a>
119 <ol jstcache="0">
120 <li jsselect="getPropertyListFromObject($this)" jstcache=" 10">
121 <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a>
122 </li>
123 </ol>
124 </li>
125 <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" j stcache="6">
126 <a href="#methods" jstcache="0">Methods</a>
127 <ol jstcache="0">
128 <li jsselect="functions.sort(sortByName)" jstcache="11" js instance="0">
129 <a jscontent="name" jsvalues=".href:'#method-' + name" h ref="#method-disableForTab" jstcache="43">disableForTab</a>
130 </li><li jsselect="functions.sort(sortByName)" jstcache="1 1" jsinstance="*1">
131 <a jscontent="name" jsvalues=".href:'#method-' + name" h ref="#method-enableForTab" jstcache="43">enableForTab</a>
132 </li>
133 </ol>
134 </li>
135 <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcach e="7" style="display: none; ">
136 <a href="#events" jstcache="0">Events</a>
137 <ol jstcache="0">
138 <li jsselect="events.sort(sortByName)" jstcache="12">
139 <a jscontent="name" jsvalues=".href:'#event-' + name" hr ef="#event-anchor" jstcache="44">eventName</a>
140 </li>
141 </ol>
142 </li>
143 <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache= "8" style="display: none; ">
144 <a href="#types" jstcache="0">Types</a>
145 <ol jstcache="0">
146 <li jsselect="types.sort(sortByName)" jstcache="38">
147 <a jscontent="id" jsvalues=".href:'#type-' + id" href="# id-anchor" jstcache="45">id</a>
148 </li>
149 </ol>
150 </li>
151 </ol>
152 </li>
153 </div>
154 </ol>
155 </div>
156 <!-- /TABLE OF CONTENTS -->
157
158 <!-- STATIC CONTENT PLACEHOLDER -->
159 <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Page Actions</div>
160
161 <!-- BEGIN AUTHORED CONTENT -->
162 <p jstcache="0">Page actions are a simple way to represent actions that can be t aken on a page ("Email this page", "Share with Facebook", etc).</p>
163
164 <p jstcache="0">
165 Page actions are displayed as icons on the right side of the OmniBox.
166 The RSS icon in the following screenshot
167 represents a page action
168 that lets you subscribe to
169 the RSS feed for the current page.
170 </p>
171
172 <img src="images/page-action.png" width="361" height="79" jstcache="0">
173
174 <h2 id="manifest" jstcache="0">Manifest</h2>
175
176 <p jstcache="0">Developers can declare page actions in the manifest using the fo llowing syntax:</p>
177
178 <pre jstcache="0">"page_actions": [
179 {
180 "id": "myaction", // Chosen by the developer. Should be unique within their extension.
181 "name": "Do action", // The page action name, also used as tooltip (unles s overridden).
182 "icons": ["favicon.png", "favicon2.png"]
183 }
184 ]</pre>
185
186 <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 resi zed to fit.</p>
187
188 <a name="H2-1" jstcache="0"></a><h2 jstcache="0">Events</h2>
189
190 <p jstcache="0">Each page action displays an icon in the OmniBox. Whenever the u ser 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>
191
192 <p jstcache="0">Page action events are created dynamically using the id of the p age action declared in the manifest. For example, a page action with id 'foo' wi ll setup an event called chrome.pageActions["foo"]. An extension would then regi ster listeners like so:</p>
193
194 <pre jstcache="0">chrome.pageActions["foo"].addListener(function(object reply) {
195 console.log(reply.pageActionId); // Display the id of the page action.
196 console.log(reply.data.tabId); // Display the id of the tab for which the p age action event applies.
197 console.log(reply.data.tabUrl); // Display the URL of the page for which the page action event applies.
198 });</pre>
199
200 <p style="margin-left:25px;" jstcache="0"><strong jstcache="0">Parameters</stron g></p>
201
202 <p style="margin-left:25px;" jstcache="0"><i jstcache="0">reply ( object )</i><b r jstcache="0">
203 &nbsp;&nbsp;&nbsp;An object containing the information about the event. Contains the following properties:</p>
204 <p style="margin-left:50px;" jstcache="0"><i jstcache="0">pageActionId ( string )</i><br jstcache="0">
205 &nbsp;&nbsp;&nbsp;The id of the page action that triggered the event.</p>
206 <p style="margin-left:50px;" jstcache="0"><i jstcache="0">data ( object )</i><br jstcache="0">
207 &nbsp;&nbsp;&nbsp;An object specifying what tab and which page the event applies to. Contains the following properties:</p>
208 <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabId ( string )</i><b r jstcache="0">
209 &nbsp;&nbsp;&nbsp;The id of the tab that was active when the event was triggered .</p>
210 <p style="margin-left:75px;" jstcache="0"><i jstcache="0">tabUrl ( string )</i>< br jstcache="0">
211 &nbsp;&nbsp;&nbsp;The url of the page for which the page action applies to.</p>
212 <!-- END AUTHORED CONTENT -->
213 </div>
214
215 <!-- API PAGE -->
216 <div class="apiPage" jsselect="apiDefinition" jstcache="3">
217 <a name="apiReference" jstcache="0"></a>
218 <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API ref erence: chrome.pageActions</h2>
219
220 <!-- PROPERTIES -->
221 <div jsdisplay="$this.properties" class="apiGroup" jstcache="5" style= "display: none; ">
222 <a name="properties" jstcache="0"></a>
223 <h3 id="properties" jstcache="0">Properties</h3>
224
225 <div jsselect="getPropertyListFromObject($this)" jstcache="10">
226 <a jsvalues=".name:'property-' + name" jstcache="15"></a>
227 <h4 jscontent="name" jstcache="16">getLastError</h4>
228 <div class="summary" jstcache="0">
229 <!-- Note: intentionally longer 80 columns -->
230 <span jscontent="getModuleName() + '.'" jstcache="23">chrome.ext ension</span><span jscontent="$this.name" jstcache="24">lastError</span>
231 </div>
232 <div transclude="valueTemplate" jstcache="17">
233 </div>
234 </div>
235
236 </div> <!-- /apiGroup -->
237
238 <!-- METHODS -->
239 <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="a piGroup" id="methods" jstcache="6">
240 <a name="methods" jstcache="0"></a>
241 <h3 jstcache="0">Methods</h3>
242
243 <!-- iterates over all functions -->
244 <div class="apiItem" jsselect="functions.sort(sortByName)" jstcache= "11" jsinstance="0">
245 <a jsvalues=".name:'method-' + name" jstcache="18" name="method-di sableForTab"></a> <!-- method-anchor -->
246 <h4 jscontent="name" jstcache="16">disableForTab</h4>
247
248 <div class="summary" jstcache="0"><span jsdisplay="returns" jscont ent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span>
249 <!-- Note: intentionally longer 80 columns -->
250 <span jscontent="getFullyQualifiedFunctionName($this)" jstcach e="26">chrome.pageActions.disableForTab</span>(<span jsselect="parameters" jsval ues="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null" ><span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span j scontent="getTypeName($this)" jstcache="34">string</span>
251 <var jstcache="0"><span jscontent="name" jstcache="16">pag eActionId</span></var></span><span jsselect="parameters" jsvalues="class:optiona l ? 'optional' : ''" jstcache="27" jsinstance="*1" class=""><span jsdisplay="$in dex" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">o bject</span>
252 <var jstcache="0"><span jscontent="name" jstcache="16">act ion</span></var></span>)</div>
253
254 <div class="description" jstcache="0">
255 <p class="todo" jsdisplay="!description" jstcache="28" style="di splay: none; ">Undocumented.</p>
256 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">Disables a page action for a particular tab+url combination (makes it s 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>
257
258 <!-- PARAMETERS -->
259 <h4 jstcache="0">Parameters</h4>
260 <dl jstcache="0">
261 <div jsselect="parameters" jstcache="35" jsinstance="0">
262
263 <!-- VALUE: This is a subtemplate that is used elsewhere
264 via jsTemplate *transclude* -->
265 <div id="valueTemplate" jstcache="0">
266 <dt jstcache="0">
267 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">pageActionId</var>
268 <em jstcache="0">
269
270 <!-- TYPE -->
271 <div style="display:inline" jstcache="0">
272 (
273 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
274 <span id="typeTemplate" jstcache="0">
275 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
276 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
277 </span>
278 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
279 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
280 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
281 </span>
282 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">string</span>
283 </span>
284 </span>
285 )
286 </div>
287
288 </em>
289 </dt>
290 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
291 Undocumented.
292 </dd>
293 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">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 disable (and must match a page action id declared in th e manifest).</dd>
294
295 <!-- OBJECT PROPERTIES -->
296 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
297 <dl jstcache="0">
298 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
299 <div transclude="valueTemplate" jstcache="17">
300 </div>
301 </div>
302 </dl>
303 </dd>
304 </div> <!-- /VALUE -->
305
306 </div><div jsselect="parameters" jstcache="35" jsinstance="*1" >
307
308 <!-- VALUE: This is a subtemplate that is used elsewhere
309 via jsTemplate *transclude* -->
310 <div id="valueTemplate" jstcache="0">
311 <dt jstcache="0">
312 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">action</var>
313 <em jstcache="0">
314
315 <!-- TYPE -->
316 <div style="display:inline" jstcache="0">
317 (
318 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
319 <span id="typeTemplate" jstcache="0">
320 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
321 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
322 </span>
323 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
324 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
325 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
326 </span>
327 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">object</span>
328 </span>
329 </span>
330 )
331 </div>
332
333 </em>
334 </dt>
335 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
336 Undocumented.
337 </dd>
338 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">An object specifying what action should be applied to the page action. Contains the following properties:</dd>
339
340 <!-- OBJECT PROPERTIES -->
341 <dd jsdisplay="shouldExpandObject($this)" jstcache="41">
342 <dl jstcache="0">
343 <div jsselect="getPropertyListFromObject($this)" jstca che="10" jsinstance="0">
344 <div jstcache="0">
345 <dt jstcache="0">
346 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">tabId</var>
347 <em jstcache="0">
348
349 <!-- TYPE -->
350 <div style="display:inline" jstcache="0">
351 (
352 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
353 <span id="typeTemplate" jstcache="0">
354 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
355 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
356 </span>
357 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
358 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
359 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
360 </span>
361 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">integer</span>
362 </span>
363 </span>
364 )
365 </div>
366
367 </em>
368 </dt>
369 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
370 Undocumented.
371 </dd>
372 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">The id of the tab for which you want to disable th e page action.</dd>
373
374 <!-- OBJECT PROPERTIES -->
375 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
376 <dl jstcache="0">
377 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
378 <div transclude="valueTemplate" jstcache="17">
379 </div>
380 </div>
381 </dl>
382 </dd>
383 </div>
384 </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*1">
385 <div jstcache="0">
386 <dt jstcache="0">
387 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">url</var>
388 <em jstcache="0">
389
390 <!-- TYPE -->
391 <div style="display:inline" jstcache="0">
392 (
393 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
394 <span id="typeTemplate" jstcache="0">
395 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
396 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
397 </span>
398 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
399 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
400 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
401 </span>
402 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">string</span>
403 </span>
404 </span>
405 )
406 </div>
407
408 </em>
409 </dt>
410 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
411 Undocumented.
412 </dd>
413 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">The URL of the page you want the page action to no t apply to. If the URL specified does not match the currently navigated URL (use r has navigated to another page) then no action is taken.</dd>
414
415 <!-- OBJECT PROPERTIES -->
416 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
417 <dl jstcache="0">
418 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
419 <div transclude="valueTemplate" jstcache="17">
420 </div>
421 </div>
422 </dl>
423 </dd>
424 </div>
425 </div>
426 </dl>
427 </dd>
428 </div> <!-- /VALUE -->
429
430 </div>
431 </dl>
432
433 <!-- RETURNS -->
434 <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Re turns</h4>
435 <dl jstcache="0">
436 <div jsselect="returns" jstcache="36" style="display: none; ">
437 <div transclude="valueTemplate" jstcache="17">
438 </div>
439 </div>
440 </dl>
441
442 <!-- CALLBACK -->
443 <div jsdisplay="hasCallback(parameters)" jstcache="31" style="di splay: none; ">
444 <div jsselect="getCallbackParameters(parameters)" jstcache="37 ">
445 <h4 jstcache="0">Callback function</h4>
446 <p jstcache="0">
447 If you specify the <em jstcache="0">callback</em> parameter,
448 it should specify a function that looks like this:
449 </p>
450
451 <!-- Note: intentionally longer 80 columns -->
452 <pre jstcache="0">function(<span jscontent="getSignatureString (parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdue d" jstcache="0">{...}</span>);</pre>
453 <dl jstcache="0">
454 <div jsselect="parameters" jstcache="35">
455 <div transclude="valueTemplate" jstcache="17">
456 </div>
457 </div>
458 </dl>
459 </div>
460 </div>
461
462 </div> <!-- /description -->
463
464 </div><div class="apiItem" jsselect="functions.sort(sortByName)" jst cache="11" jsinstance="*1">
465 <a jsvalues=".name:'method-' + name" jstcache="18" name="method-en ableForTab"></a> <!-- method-anchor -->
466 <h4 jscontent="name" jstcache="16">enableForTab</h4>
467
468 <div class="summary" jstcache="0"><span jsdisplay="returns" jscont ent="getTypeName(returns)" jstcache="25" style="display: none; ">void</span>
469 <!-- Note: intentionally longer 80 columns -->
470 <span jscontent="getFullyQualifiedFunctionName($this)" jstcach e="26">chrome.pageActions.enableForTab</span>(<span jsselect="parameters" jsvalu es="class:optional ? 'optional' : ''" jstcache="27" jsinstance="0" class="null"> <span jsdisplay="$index" jstcache="33" style="display: none; ">, </span><span js content="getTypeName($this)" jstcache="34">string</span>
471 <var jstcache="0"><span jscontent="name" jstcache="16">pag eActionId</span></var></span><span jsselect="parameters" jsvalues="class:optiona l ? 'optional' : ''" jstcache="27" jsinstance="*1" class=""><span jsdisplay="$in dex" jstcache="33">, </span><span jscontent="getTypeName($this)" jstcache="34">o bject</span>
472 <var jstcache="0"><span jscontent="name" jstcache="16">act ion</span></var></span>)</div>
473
474 <div class="description" jstcache="0">
475 <p class="todo" jsdisplay="!description" jstcache="28" style="di splay: none; ">Undocumented.</p>
476 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="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 p age action will automatically be disabled (its icon hidden) if the user navigate s to a new URL or closes the tab. The action will also automatically be enabled/ disabled as the user switches tabs.</p>
477
478 <!-- PARAMETERS -->
479 <h4 jstcache="0">Parameters</h4>
480 <dl jstcache="0">
481 <div jsselect="parameters" jstcache="35" jsinstance="0">
482
483 <!-- VALUE: This is a subtemplate that is used elsewhere
484 via jsTemplate *transclude* -->
485 <div id="valueTemplate" jstcache="0">
486 <dt jstcache="0">
487 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">pageActionId</var>
488 <em jstcache="0">
489
490 <!-- TYPE -->
491 <div style="display:inline" jstcache="0">
492 (
493 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
494 <span id="typeTemplate" jstcache="0">
495 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
496 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
497 </span>
498 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
499 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
500 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
501 </span>
502 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">string</span>
503 </span>
504 </span>
505 )
506 </div>
507
508 </em>
509 </dt>
510 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
511 Undocumented.
512 </dd>
513 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">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>
514
515 <!-- OBJECT PROPERTIES -->
516 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
517 <dl jstcache="0">
518 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
519 <div transclude="valueTemplate" jstcache="17">
520 </div>
521 </div>
522 </dl>
523 </dd>
524 </div> <!-- /VALUE -->
525
526 </div><div jsselect="parameters" jstcache="35" jsinstance="*1" >
527
528 <!-- VALUE: This is a subtemplate that is used elsewhere
529 via jsTemplate *transclude* -->
530 <div id="valueTemplate" jstcache="0">
531 <dt jstcache="0">
532 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">action</var>
533 <em jstcache="0">
534
535 <!-- TYPE -->
536 <div style="display:inline" jstcache="0">
537 (
538 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
539 <span id="typeTemplate" jstcache="0">
540 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
541 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
542 </span>
543 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
544 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
545 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
546 </span>
547 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">object</span>
548 </span>
549 </span>
550 )
551 </div>
552
553 </em>
554 </dt>
555 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
556 Undocumented.
557 </dd>
558 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">An object specifing what action should be applied to the page action. Contains the following properties:</dd>
559
560 <!-- OBJECT PROPERTIES -->
561 <dd jsdisplay="shouldExpandObject($this)" jstcache="41">
562 <dl jstcache="0">
563 <div jsselect="getPropertyListFromObject($this)" jstca che="10" jsinstance="0">
564 <div jstcache="0">
565 <dt jstcache="0">
566 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">tabId</var>
567 <em jstcache="0">
568
569 <!-- TYPE -->
570 <div style="display:inline" jstcache="0">
571 (
572 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
573 <span id="typeTemplate" jstcache="0">
574 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
575 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
576 </span>
577 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
578 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
579 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
580 </span>
581 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">integer</span>
582 </span>
583 </span>
584 )
585 </div>
586
587 </em>
588 </dt>
589 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
590 Undocumented.
591 </dd>
592 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">The id of the tab for which you want to enable the page action.</dd>
593
594 <!-- OBJECT PROPERTIES -->
595 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
596 <dl jstcache="0">
597 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
598 <div transclude="valueTemplate" jstcache="17">
599 </div>
600 </div>
601 </dl>
602 </dd>
603 </div>
604 </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="1">
605 <div jstcache="0">
606 <dt jstcache="0">
607 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">url</var>
608 <em jstcache="0">
609
610 <!-- TYPE -->
611 <div style="display:inline" jstcache="0">
612 (
613 <span class="optional" jsdisplay="optional" jstc ache="47" style="display: none; ">optional</span>
614 <span id="typeTemplate" jstcache="0">
615 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
616 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
617 </span>
618 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
619 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
620 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
621 </span>
622 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">string</span>
623 </span>
624 </span>
625 )
626 </div>
627
628 </em>
629 </dt>
630 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
631 Undocumented.
632 </dd>
633 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">The URL of the page you want the page action to ap ply to. If the URL specified does not match the currently navigated URL (user ha s navigated to another page) then no action is taken.</dd>
634
635 <!-- OBJECT PROPERTIES -->
636 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
637 <dl jstcache="0">
638 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
639 <div transclude="valueTemplate" jstcache="17">
640 </div>
641 </div>
642 </dl>
643 </dd>
644 </div>
645 </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="2">
646 <div jstcache="0">
647 <dt jstcache="0">
648 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">title</var>
649 <em jstcache="0">
650
651 <!-- TYPE -->
652 <div style="display:inline" jstcache="0">
653 (
654 <span class="optional" jsdisplay="optional" jstc ache="47" style="">optional</span>
655 <span id="typeTemplate" jstcache="0">
656 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
657 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
658 </span>
659 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
660 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
661 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
662 </span>
663 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">string</span>
664 </span>
665 </span>
666 )
667 </div>
668
669 </em>
670 </dt>
671 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
672 Undocumented.
673 </dd>
674 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">Specifying |title| allows you to change the toolti p that appears when you hover over the page action icon in the OmniBox. This par ameter is optional and if omitted then the page action |name| property declared in the manifest is used.</dd>
675
676 <!-- OBJECT PROPERTIES -->
677 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
678 <dl jstcache="0">
679 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
680 <div transclude="valueTemplate" jstcache="17">
681 </div>
682 </div>
683 </dl>
684 </dd>
685 </div>
686 </div><div jsselect="getPropertyListFromObject($this)" jstcache="10" jsinstance="*3">
687 <div jstcache="0">
688 <dt jstcache="0">
689 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">iconId</var>
690 <em jstcache="0">
691
692 <!-- TYPE -->
693 <div style="display:inline" jstcache="0">
694 (
695 <span class="optional" jsdisplay="optional" jstc ache="47" style="">optional</span>
696 <span id="typeTemplate" jstcache="0">
697 <span jsdisplay="getTypeRef($this)" jstcache=" 48" style="display: none; ">
698 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
699 </span>
700 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
701 <span jsdisplay="isArray($this)" jstcache="5 1" style="display: none; ">
702 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
703 </span>
704 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">integer</span>
705 </span>
706 </span>
707 )
708 </div>
709
710 </em>
711 </dt>
712 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39" style="display: none; ">
713 Undocumented.
714 </dd>
715 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">A zero-based index into the |icons| vector specifi ed in the manifest. This parameter is optional and if omitted then the first ico n in the |icons| vector of the page action is used. This id is useful to represe nt different page action states. Example: An RSS feed icon could have a 'subscri be now' icon and an 'already subscribed' icon.</dd>
716
717 <!-- OBJECT PROPERTIES -->
718 <dd jsdisplay="shouldExpandObject($this)" jstcache="41" st yle="display: none; ">
719 <dl jstcache="0">
720 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
721 <div transclude="valueTemplate" jstcache="17">
722 </div>
723 </div>
724 </dl>
725 </dd>
726 </div>
727 </div>
728 </dl>
729 </dd>
730 </div> <!-- /VALUE -->
731
732 </div>
733 </dl>
734
735 <!-- RETURNS -->
736 <h4 jsdisplay="returns" jstcache="30" style="display: none; ">Re turns</h4>
737 <dl jstcache="0">
738 <div jsselect="returns" jstcache="36" style="display: none; ">
739 <div transclude="valueTemplate" jstcache="17">
740 </div>
741 </div>
742 </dl>
743
744 <!-- CALLBACK -->
745 <div jsdisplay="hasCallback(parameters)" jstcache="31" style="di splay: none; ">
746 <div jsselect="getCallbackParameters(parameters)" jstcache="37 ">
747 <h4 jstcache="0">Callback function</h4>
748 <p jstcache="0">
749 If you specify the <em jstcache="0">callback</em> parameter,
750 it should specify a function that looks like this:
751 </p>
752
753 <!-- Note: intentionally longer 80 columns -->
754 <pre jstcache="0">function(<span jscontent="getSignatureString (parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdue d" jstcache="0">{...}</span>);</pre>
755 <dl jstcache="0">
756 <div jsselect="parameters" jstcache="35">
757 <div transclude="valueTemplate" jstcache="17">
758 </div>
759 </div>
760 </dl>
761 </div>
762 </div>
763
764 </div> <!-- /description -->
765
766 </div> <!-- /apiItem -->
767
768 </div> <!-- /apiGroup -->
769
770 <!-- EVENTS -->
771 <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGrou p" jstcache="7" style="display: none; ">
772 <a name="events" jstcache="0"></a>
773 <h3 id="events" jstcache="0">Events</h3>
774
775 <!-- iterates over all events -->
776 <div jsselect="events.sort(sortByName)" class="apiItem" jstcache="12 ">
777 <a jsvalues=".name:'event-' + name" jstcache="19"></a>
778 <h4 jscontent="name" jstcache="16">event name</h4>
779
780 <div class="summary" jstcache="0">
781 <!-- Note: intentionally longer 80 columns -->
782 <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>);
783 </div>
784
785 <div class="description" jstcache="0">
786 <p class="todo" jsdisplay="!description" jstcache="28">Undocumen ted.</p>
787 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">
788 A description from the json schema def of the event goes here.
789 </p>
790
791 <!-- PARAMETERS -->
792 <h4 jstcache="0">Parameters</h4>
793 <dl jstcache="0">
794 <div jsselect="parameters" jstcache="35">
795 <div transclude="valueTemplate" jstcache="17">
796 </div>
797 </div>
798 </dl>
799
800 </div> <!-- /decription -->
801
802 </div> <!-- /apiItem -->
803
804 </div> <!-- /apiGroup -->
805
806 <!-- TYPES -->
807 <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8" style="display: none; ">
808 <a name="types.sort(sortByName)" jstcache="0"></a>
809 <h3 id="types" jstcache="0">Types</h3>
810
811 <!-- iterates over all types -->
812 <div jsselect="types" class="apiItem" jstcache="13">
813 <a jsvalues=".name:'type-' + id" jstcache="20"></a>
814 <h4 jscontent="id" jstcache="21">type name</h4>
815
816 <div transclude="valueTemplate" jstcache="17">
817 </div>
818
819 </div> <!-- /apiItem -->
820
821 </div> <!-- /apiGroup -->
822
823 </div> <!-- /apiPage -->
824 </div> <!-- /mainColumn -->
825 </div> <!-- /pageContent -->
826 <div id="pageFooter" --="" jstcache="0">
827 <p jstcache="0">
828 Except as otherwise <a href="http://code.google.com/policies.html#restrictions " jstcache="0">noted</a>,
829 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/" jstcache="0">Creative Commons
830 Attribution 3.0 License</a>, and code samples are licensed under the
831 <a rel="license" href="http://code.google.com/google_bsd_license.html" jstcach e="0">BSD License</a>.
832 </p>
833 <p jstcache="0">
834 ©2009 Google
835 </p>
836 </div> <!-- /pageFooter -->
837 </div> <!-- /container -->
838 </body></html>
839 #EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698