我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

Type Object
Mandatory No
Example
"omnibox": {
  "keyword": "mdn"
}

Use the omnibox key to define an omnibox keyword for your extension.

When the user types this keyword into the browser's address bar, followed by a space, then any subsequent characters will be sent to the extension using the omnibox API. The extension will then be able to populate the address bar's drop-down suggestions list with its own suggestions.

If two or more extensions define the same keyword, then the extension that was installed last gets to control the keyword. Any previously installed extensions that defined the same keyword will no longer be able to use the omnibox API.

Example

"omnibox": {
  "keyword": "mdn"
}

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
omniboxChrome Full support YesEdge No support NoFirefox Full support 52Opera Full support YesFirefox Android No support No
keyChrome Full support YesEdge No support NoFirefox Full support 52Opera Full support YesFirefox Android No support No

Legend

Full support  
Full support
No support  
No support

文件標籤與貢獻者

此頁面的貢獻者: mdnwebdocs-bot, wbamberg, andrewtruongmoz
最近更新: mdnwebdocs-bot,