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

Side by Side Diff: chrome/common/extensions/docs/templates/intros/commands.html

Issue 11635032: Added introductory tables to Chrome apps APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 <p> 1 <table class="intro">
2 The commands API allows you to add keyboard shortcuts that trigger actions in 2 <tr>
3 your extension. An action can be opening the browser action or page action popup 3 <th scope="col"></th>
4 or sending a command to the extension. 4 <th scope="col"></th>
5 </p> 5 </tr>
6 <tr>
7 <td><strong>Description:</strong></td>
8 <td>Use the commands API to add keyboard shortcuts
9 that trigger actions in your extension,
10 for example, an action to open the browser action
11 or send a command to the extension.</td>
12 </tr>
13 <tr>
14 <td><strong>Availability:</strong></td>
15 <td>On target to be stable in Chrome 25</td>
saroop 2012/12/21 00:39:44 On target seems confusing .. shall we say devchann
16 </tr>
17 <tr>
18 <td><strong>Permissions:</strong></td>
19 <td>None</td>
20 </tr>
21 </table>
6 22
7 <h2 id="manifest">Manifest</h2> 23 <h2 id="manifest">Manifest</h2>
8 <p> 24 <p>
9 You must set manifest_version to (at least) 2 to use this API. 25 You must set manifest_version to (at least) 2 to use this API.
10 </p> 26 </p>
11 27
12 <h2 id="usage">Usage</h2> 28 <h2 id="usage">Usage</h2>
13 <p>The commands API allows you to define specific commands, and bind them to a 29 <p>The commands API allows you to define specific commands, and bind them to a
14 default key combination. Each command your extension accepts must be listed in 30 default key combination. Each command your extension accepts must be listed in
15 the manifest as an attribute of the 'commands' manifest key. Note: Combinations 31 the manifest as an attribute of the 'commands' manifest key. Note: Combinations
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 console.log('Command:', command); 72 console.log('Command:', command);
57 }); 73 });
58 </pre> 74 </pre>
59 75
60 <p>The '_execute_browser_action' and '_execute_page_action' commands are 76 <p>The '_execute_browser_action' and '_execute_page_action' commands are
61 reserved for the action of opening your extension's popups. They won't normally 77 reserved for the action of opening your extension's popups. They won't normally
62 generate events that you can handle. If you need to take action based on your 78 generate events that you can handle. If you need to take action based on your
63 popup opening, consider listening for an 'onDomReady' event inside your popup's 79 popup opening, consider listening for an 'onDomReady' event inside your popup's
64 code. 80 code.
65 </p> 81 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698