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

Side by Side Diff: chrome/common/extensions/docs/examples/api/omnibox/background.html

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 7 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
(Empty)
1 <script>
2 // This event is fired each time the user updates the text in the omnibox,
3 // as long as the extension's keyword mode is still active.
4 chrome.experimental.omnibox.onInputChanged.addListener(
5 function(text, suggest) {
6 console.log('inputChanged: ' + text);
7 suggest([
8 {content: text + " one", description: "the first one"},
9 {content: text + " number two", description: "the second entry"}
10 ]);
11 });
12
13 // This event is fired with the user accepts the input in the omnibox.
14 chrome.experimental.omnibox.onInputEntered.addListener(
15 function(text) {
16 console.log('inputEntered: ' + text);
17 alert('You just typed "' + text + '"');
18 });
19 </script>
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | chrome/common/extensions/docs/examples/api/omnibox/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698