API Request - Dismiss alert in WebExtensions

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
2 years ago
5 months ago

People

(Reporter: hmpro74, Unassigned)

Tracking

52 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36

Steps to reproduce:

Currently there is no way to dismiss an alert/confirm/prompt at WebExtensions side. I think it should be supported.

It will be useful under some circumstances, such as web automation testing.

In Chrome, this can be done by chrome.debugger API:
chrome.debugger.sendCommand(tabId, "Page.handleJavaScriptDialog", params, function () {});

Firefox doesn't support debugger API yet, it may be better to have a specific API related to alert handling.

Related thread: https://bugzilla.mozilla.org/show_bug.cgi?id=1323098
(Reporter)

Updated

2 years ago
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit

Updated

2 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1316741
(Reporter)

Comment 2

2 years ago
This is not a duplicate of implement chrome.debugger.

Please see comment of Luca at bug 1323098:
Forcing an addon to require the "debugger" permission (which gives to the addon huge powers, basically on everything that is exposed to the debugging protocol) just to dismiss a javascript dialog in a selected tab seems a bit overkill
(it looks more like a workaround for an API that is currently missing in Chrome).
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
OK. Well, we won't be implementing this outside of the debugger API.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago2 years ago
Resolution: --- → WONTFIX

Updated

5 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.