Closed
Bug 1456252
Opened 8 years ago
Closed 8 years ago
add 'hideAfter' option to notifications.create()
Categories
(WebExtensions :: Frontend, enhancement)
WebExtensions
Frontend
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jhirsch, Unassigned)
Details
(Whiteboard: [design-decision-denied])
Some OSes, like windows, let browser notifications sit on screen for a really, really long time by default, on the order of 15-20 seconds.
To hide a notification sooner than the default, currently webextensions must
- set an onShown listener
- set a timeout inside the listener
- and call notifications.clear() inside the timeout
It would be nice to add a |hideAfter| option to the existing notification.create options object, so that extensions could just ask for the notification to be hidden after, say, 2 seconds.
Now that I think about it, this could be a pathway to abuse (rapidly showing and hiding notifications, or opening hundreds of notifications with a very long timeout). Offering "fast"/"slow" options might be better than passing a number of seconds.
Comment 1•8 years ago
|
||
Hi Jared, this has been added to the agenda for the WebExtensions APIs triage on May 8. Would you be able to join us?
Here’s a quick overview of what to expect at the triage:
* We normally spend 5 minutes per bug
* The more information in the bug, the better
* The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details
Relevant Links:
* Wiki for the meeting: https://wiki.mozilla.org/WebExtensions/Triage#Next_Meeting
* Meeting agenda: https://docs.google.com/document/d/1TRkZ2u3GQXwlHpfP4-P_SXcwIwvlQz5Sm-C8I89Ya_o/edit#
* Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
Comment 2•8 years ago
|
||
Rob to follow up with a summary of why this was denied in the design decision meeting.
Flags: needinfo?(rob)
Whiteboard: [design-decision-needed] → [design-decision-denied]
Comment 3•8 years ago
|
||
There is no need for a new API to achieve the requested behavior; the existing APIs can be combined (as you've showed), and the resulting extension would also work in other browsers.
PS. In this case, the desire is to close the notification sooner. The opposite problem (notifications disappearing too soon) is tracked in bug 1417848.
Flags: needinfo?(rob)
Updated•8 years ago
|
Severity: normal → enhancement
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•