Clarify behavior of tabs.remove() Promise when beforeunload blocks removal

RESOLVED WORKSFORME

Status

defect
RESOLVED WORKSFORME
3 years ago
2 years ago

People

(Reporter: ke5trel, Unassigned)

Tracking

Details

Documentation states tabs.remove() returns:

> "A Promise that will be fulfilled with no arguments when the tab(s) have been removed."

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/remove

In Firefox 53 the Promise is fulfilled after the beforeunload response even when the user chooses to stay on the page and the tab is not removed.

Possible wording:

> "A Promise that will be fulfilled with no arguments when the tab(s) have been removed 
> or the user chooses to stay on the page(s)."

Note that this differs from Chrome 55 where the callback returns immediately without waiting for the beforeunload response but this means the developer cannot distinguish between user-initiated and programmatic tab closure.
move to dev doc component - we are OK with that wording change proposal
Flags: needinfo?(sescalante)
Component: WebExtensions: Untriaged → Add-ons
Product: Toolkit → Developer Documentation
Flags: needinfo?(sescalante)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.