1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This event is fired each time the user updates the text in the omnibox,
6 // as long as the extension's keyword mode is still active.
7 chrome.omnibox.onInputChanged.addListener(
8 function(text, suggest) {
9 console.log('inputChanged: ' + text);
11 {content: text + " one", description: "the first one"},
12 {content: text + " number two", description: "the second entry"}
16 // This event is fired with the user accepts the input in the omnibox.
17 chrome.omnibox.onInputEntered.addListener(
19 console.log('inputEntered: ' + text);
20 alert('You just typed "' + text + '"');