The omnibox API allows you to register a keyword with Firefox's address bar.

Manifest keys: omnibox

Not allowed in: Content scripts, Devtools pages

_DefaultSuggestResultDescriptionStyles
_DefaultSuggestResultDescriptionStylesRaw
_SuggestResultDescriptionStyles
_SuggestResultDescriptionStylesRaw
DefaultSuggestResult
SuggestResult
DescriptionStyleType
OnInputEnteredDisposition
onDeleteSuggestion
onInputCancelled
onInputChanged
onInputEntered
onInputStarted
setDefaultSuggestion
DescriptionStyleType: "url" | "match" | "dim"

The style type.

OnInputEnteredDisposition:
    | "currentTab"
    | "newForegroundTab"
    | "newBackgroundTab"

The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab.

onDeleteSuggestion: WebExtEvent<(text: string) => void>

User has deleted a suggested result.

onInputCancelled: WebExtEvent<() => void>

User has ended the keyword input session without accepting the input.

onInputChanged: WebExtEvent<
    (
        text: string,
        suggest: (suggestResults: SuggestResult[]) => void,
    ) => void,
>

User has changed what is typed into the omnibox.

A callback passed to the onInputChanged event used for sending suggestions back to the browser.

onInputEntered: WebExtEvent<
    (text: string, disposition: OnInputEnteredDisposition) => void,
>

User has accepted what is typed into the omnibox.

onInputStarted: WebExtEvent<() => void>

User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.

  • Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.

    Parameters

    Returns void