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

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

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor changes Created 7 years, 8 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 <table class="intro">
2 <tr>
3 <th scope="col"></th>
4 <th scope="col"></th>
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>Google Chrome 25</td>
16 </tr>
17 <tr>
18 <td><strong>Permissions:</strong></td>
19 <td>None</td>
20 </tr>
21 </table>
22
23 <h2 id="manifest">Manifest</h2> 1 <h2 id="manifest">Manifest</h2>
24 <p> 2 <p>
25 You must set manifest_version to (at least) 2 to use this API. 3 You must set manifest_version to (at least) 2 to use this API.
26 </p> 4 </p>
27 5
28 <h2 id="usage">Usage</h2> 6 <h2 id="usage">Usage</h2>
29 <p>The commands API allows you to define specific commands, and bind them to a 7 <p>The commands API allows you to define specific commands, and bind them to a
30 default key combination. Each command your extension accepts must be listed in 8 default key combination. Each command your extension accepts must be listed in
31 the manifest as an attribute of the 'commands' manifest key. Note: Combinations 9 the manifest as an attribute of the 'commands' manifest key. Note: Combinations
32 that involve Ctrl+Alt are not permitted in order to avoid conflicts with the 10 that involve Ctrl+Alt are not permitted in order to avoid conflicts with the
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 console.log('Command:', command); 54 console.log('Command:', command);
77 }); 55 });
78 </pre> 56 </pre>
79 57
80 <p>The '_execute_browser_action' and '_execute_page_action' commands are 58 <p>The '_execute_browser_action' and '_execute_page_action' commands are
81 reserved for the action of opening your extension's popups. They won't normally 59 reserved for the action of opening your extension's popups. They won't normally
82 generate events that you can handle. If you need to take action based on your 60 generate events that you can handle. If you need to take action based on your
83 popup opening, consider listening for an 'onDomReady' event inside your popup's 61 popup opening, consider listening for an 'onDomReady' event inside your popup's
84 code. 62 code.
85 </p> 63 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698