Closed Bug 1493923 Opened 8 years ago Closed 8 years ago

Provide command to quit Firefox

Categories

(WebExtensions :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: freedom4cows, Unassigned)

Details

(Whiteboard: [design-decision-denied])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 Build ID: 20180920131237 Steps to reproduce: There is currently no official way of exiting Firefox via a WebExtension. In Tridactyl, we get around this by simply closing all windows: ``` export async function qall() { let windows = await browser.windows.getAll() windows.map(window => browser.windows.remove(window.id)) } ``` But this breaks the "restore my windows and tabs from last time" functionality. Providing a way for extensions to trigger the "Ctrl-Shift-Q" graceful Firefox exit would solve this issue, e.g `browser.windows.quit()`. Our related issue: https://github.com/tridactyl/tridactyl/issues/350 Please do not require it to be triggered by browserAction etc. as a) that would make it useless to us and b) any malicious addon can already close all windows and exit Firefox. Thanks.
Whiteboard: [design-decision-needed]
This feature does not bring a lot of value to broader extensions ecosystem and has the potential for abuse. Closing the browser is a user-initiated action today, and providing a way to make it happen without a user-initiated action is not in the best interests of Firefox users. Yes, malicious extensions can do it today by closing all windows. That isn't an argument that we should make it easier. The Tridactyl use case could be solved by having the extension save the session state prior to closing all of the windows (and restore it on startup). It would require some amount of work using the available API today, but becomes easier when bug 1413525 lands.
Severity: normal → enhancement
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Whiteboard: [design-decision-needed] → [design-decision-denied]
You need to log in before you can comment on or make changes to this bug.