如何关闭 Firefox WebExtensions 中的警报?
How to dismiss alert in Firefox WebExtensions?
在 Chrome 扩展中,我可以使用 chrome.debugger
API:
关闭 alert()
chrome.debugger.sendCommand(tabId, "Page.handleJavaScriptDialog", params, function () {});
但 Firefox WebExtensions 目前不支持 chrome.debugger
,如 documentation 中所述。
Document Reference:
Planned APIs
We don't support the following APIs, but plan to, soon:
- debugger
还有其他方法可以实现吗?
目前无法关闭 WebExtensions 中的警报。
在 Chrome 扩展中,我可以使用 chrome.debugger
API:
alert()
chrome.debugger.sendCommand(tabId, "Page.handleJavaScriptDialog", params, function () {});
但 Firefox WebExtensions 目前不支持 chrome.debugger
,如 documentation 中所述。
Document Reference:
Planned APIs
We don't support the following APIs, but plan to, soon:
- debugger
还有其他方法可以实现吗?
目前无法关闭 WebExtensions 中的警报。