Movatterモバイル変換


[0]ホーム

URL:


  1. Mozilla
  2. Add-ons
  3. Browser extensions
  4. JavaScript APIs
  5. omnibox
  6. omnibox.onInputCancelled

omnibox.onInputCancelled

Fired when the user has cancelled their interaction with your extension (for example, by clicking outside the address bar).

Syntax

js
browser.omnibox.onInputCancelled.addListener(listener)browser.omnibox.onInputCancelled.removeListener(listener)browser.omnibox.onInputCancelled.hasListener(listener)

Events have three functions:

addListener(listener)

Adds a listener to this event.

removeListener(listener)

Stop listening to this event. Thelistener argument is the listener to remove.

hasListener(listener)

Check whetherlistener is registered for this event. Returnstrue if it is listening,false otherwise.

addListener syntax

The listener function is passed no parameters.

Examples

js
browser.omnibox.onInputCancelled.addListener(() => {  console.log("The user cancelled the session.");});

Browser compatibility

Note:This API is based on Chromium'schrome.omnibox API.

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp