pageAction.openPopup()
Öffnen Sie das Popup der Seitenaktion.
Sie können diese Funktion nur innerhalb des Handlers für eine Benutzeraktion aufrufen.
Syntax
js
browser.pageAction.openPopup()
Parameter
Keine.
Rückgabewert
Ein Promise
, der ohne Argumente aufgelöst wird.
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
openPopup |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Beispiele
Öffnen Sie das Popup, wenn der Benutzer ein Kontextmenüelement auswählt:
js
browser.menus.create({
id: "open-popup",
title: "open popup",
contexts: ["all"],
});
browser.menus.onClicked.addListener(() => {
browser.pageAction.openPopup();
});