omnibox

Enables extensions to implement customized behavior when the user types into the browser's address bar.

When the user focuses the browser's address bar and starts typing, the browser displays a drop-down list containing suggested pages based on what they typed. This gives the user a quick way to access, for example, pages from their history or bookmarks.

The omnibox API provides the extension a way to customize the suggestions displayed in the drop-down, when the user enters a keyword defined by the extension. It works as follows:

  1. First, the extension must include an "omnibox" key in its manifest.json file, which defines a keyword.
  2. When the user focuses the address bar and types the keyword followed by a space, the extension gets an omnibox.onInputStarted event.
  3. Optionally, the extension can call omnibox.setDefaultSuggestion() to define the first suggestion displayed in the address bar drop-down.
  4. As the user continues to type characters, the extension gets omnibox.onInputChanged events. The event listener is passed the value the user has typed and can populate the address bar drop-down with suggestions. If the extension sets a default suggestion using omnibox.setDefaultSuggestion(), this suggestion is displayed first in the drop-down.
  5. If the user accepts a suggestion, the extension gets an omnibox.onInputEntered event. The event listener is passed the accepted suggestion.
  6. If the user deletes a suggestion, the extension gets an omnibox.onDeleteSuggestion event.
  7. If the user dismisses the drop-down, the extension gets an omnibox.onInputCancelled event.

Types

omnibox.OnInputEnteredDisposition

Describes the recommended method to handle the selected suggestion: open in the current tab, open in a new foreground tab, or open in a new background tab.

omnibox.SuggestResult

An object representing a suggestion to add to the address bar drop-down.

Functions

omnibox.setDefaultSuggestion()

Defines the first suggestion displayed in the drop-down when the user enters your extension's keyword followed by a space.

Events

omnibox.onDeleteSuggestion

Fired whenever the user deletes a suggestion.

omnibox.onInputStarted

Fired when the user focuses the address bar and types your extension's omnibox keyword, followed by a space.

omnibox.onInputChanged

Fired whenever the user's input changes after they have focused the address bar and typed your extension's keyword followed by a space.

omnibox.onInputEntered

Fired when the user accepts one of your extension's suggestions.

omnibox.onInputCancelled

Fired when the user dismisses the address bar drop-down after they have focused the address bar and typed your extension's keyword followed by a space.

Example extensions

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
omnibox
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
OnInputEnteredDisposition
Chrome – Full support
Chrome 44 (Release date: 2015-07-21)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 31 (Release date: 2015-08-04)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
SuggestResult
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote
footnote 'description' is interpreted as plain text, and XML markup is not recognized.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
SuggestResult.content
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
SuggestResult.deletable
Chrome – Full support
Chrome 63 (Release date: 2017-12-06)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 109 (Release date: 2023-01-17)
footnote Full support
Opera – Full support
Opera 50 (Release date: 2018-01-04)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
SuggestResult.description
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onDeleteSuggestion
Chrome – Full support
Chrome 63 (Release date: 2017-12-06)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 109 (Release date: 2023-01-17)
footnote Full support
Opera – Full support
Opera 50 (Release date: 2018-01-04)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onInputCancelled
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onInputChanged
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onInputEntered
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onInputStarted
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
setDefaultSuggestion
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote
footnote 'description' is interpreted as plain text, and XML markup is not recognized.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

Note: This API is based on Chromium's chrome.omnibox API.