diff options
Diffstat (limited to 'chrome/common/extensions/docs/browserAction.html')
-rw-r--r-- | chrome/common/extensions/docs/browserAction.html | 192 |
1 files changed, 185 insertions, 7 deletions
diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html index 800a81e..c46c136 100644 --- a/chrome/common/extensions/docs/browserAction.html +++ b/chrome/common/extensions/docs/browserAction.html @@ -251,6 +251,8 @@ </li><li> <a href="#method-setIcon">setIcon</a> </li><li> + <a href="#method-setPopup">setPopup</a> + </li><li> <a href="#method-setTitle">setTitle</a> </li> </ol> @@ -288,7 +290,7 @@ a browser action can also have a <a href="#tooltip">tooltip</a>, a <a href="#badge">badge</a>, - and a <a href="#popup">popup</a>. + and a <a href="#popups">popup</a>. </p> <p> @@ -323,7 +325,7 @@ like this: <b>"browser_action": { "default_icon": "images/icon19.png", <em>// <b>required</b></em> "default_title": "Google Mail", <em>// optional; shown in tooltip</em> - "popup": "popup.html" <em>// optional</em> + "default_popup": "popup.html" <em>// optional</em> }</b>, ... }</pre> @@ -335,7 +337,7 @@ A browser action must have an <a href="#icon">icon</a>. It can also have a <a href="#tooltip">tooltip</a>, a <a href="#badge">badge</a>, -and a <a href="#popup">popup</a>. +and a <a href="#popups">popup</a>. </p> <h3 id="icon">Icon</h3> @@ -406,9 +408,9 @@ respectively. <p> To add a popup to your browser action, create an HTML file with the popup's contents. -Then specify the HTML file in -the <a href="#manifest">manifest</a>, -using the <b>popup</b> field of <b>browser_action</b>. +Specify the HTML file in the <b>default_popup</b> field of <b>browser_action</b> +in the <a href="#manifest">manifest</a>, or call the +<a href="#method-setPopup">setPopup()</a> method. </p> <a name="H2-6"></a><h2>Tips</h2> @@ -1061,6 +1063,182 @@ For other examples and for help in viewing the source code, see </div> <!-- /description --> </div><div class="apiItem"> + <a name="method-setPopup"></a> <!-- method-anchor --> + <h4>setPopup</h4> + + <div class="summary"><span style="display: none; ">void</span> + <!-- Note: intentionally longer 80 columns --> + <span>chrome.browserAction.setPopup</span>(<span class="null"><span style="display: none; ">, </span><span>object</span> + <var><span>details</span></var></span>)</div> + + <div class="description"> + <p class="todo" style="display: none; ">Undocumented.</p> + <p>Sets the html document to be opened as a popup when the user clicks on the browser action's icon.</p> + + <!-- PARAMETERS --> + <h4>Parameters</h4> + <dl> + <div> + <div> + <dt> + <var>details</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional" style="display: none; ">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>object</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo"> + Undocumented. + </dd> + <dd style="display: none; "> + Description of this parameter from the json schema. + </dd> + + <!-- OBJECT PROPERTIES --> + <dd> + <dl> + <div> + <div> + <dt> + <var>tabId</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>integer</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> + </div><div> + <div> + <dt> + <var>popup</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional" style="display: none; ">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>string</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>The html file to show in a popup. If set to the empty string (''), no popup is shown.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> + </div> + </dl> + </dd> + </div> + </div> + </dl> + + <!-- RETURNS --> + <h4 style="display: none; ">Returns</h4> + <dl> + <div style="display: none; "> + <div> + </div> + </div> + </dl> + + <!-- CALLBACK --> + <div style="display: none; "> + <div> + <h4>Callback function</h4> + <p> + The callback <em>parameter</em> should specify a function + that looks like this: + </p> + <p> + If you specify the <em>callback</em> parameter, it should + specify a function that looks like this: + </p> + + <!-- Note: intentionally longer 80 columns --> + <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);</pre> + <dl> + <div> + <div> + </div> + </div> + </dl> + </div> + </div> + + </div> <!-- /description --> + + </div><div class="apiItem"> <a name="method-setTitle"></a> <!-- method-anchor --> <h4>setTitle</h4> @@ -1257,7 +1435,7 @@ For other examples and for help in viewing the source code, see <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Fired when a browser action icon is clicked.</p> + <p>Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.</p> <!-- PARAMETERS --> <h4>Parameters</h4> |