Responding to Omnibox Input
Process user input from the omnibox, provide suggestions, and execute custom logic based on the entered text.
Responding to Omnibox Input
Welcome to the lesson on making your extension smart! We've learned how to set up an omnibox keyword. Now, let's make it respond to user input.
The omnibox (address bar) is a powerful place. Your extension can listen for what users type after your keyword and react in two main ways:
- Provide suggestions: Guide the user as they type.
- Execute actions: Perform tasks when they press Enter.
The Omnibox API
To interact with the omnibox, we use the chrome.omnibox API. This API lives in your extension's background script (service worker).
Remember to declare the "omnibox" permission in your manifest.json file for your extension to use this API.
All lessons in this course
- Adding Context Menu Items
- Omnibox Keyword Integration
- Responding to Omnibox Input
- Keyboard Shortcuts with the Commands API