Open Bug 1139363 Opened 9 years ago Updated 2 years ago

Get rid of Notification.onclose and Notification.onshow events

Categories

(Core :: DOM: Core & HTML, task, P5)

x86_64
Linux
task

Tracking

()

People

(Reporter: azasypkin, Unassigned)

References

Details

(Keywords: site-compat)

Recently "onclose" and "onshow" events were removed from Notification API spec - see [1], [2] and [3]. So we should update Gecko implementation as well.

Removing of "onclose" is especially valuable for gaia apps, see bug 1068564 and bug 1136633. 

[1] https://notifications.spec.whatwg.org/
[2] https://lists.w3.org/Archives/Public/public-whatwg-archive/2014Oct/0135.html
[3] https://lists.w3.org/Archives/Public/public-whatwg-archive/2014Oct/0082.html
See Also: → 1068564
See Also: → 1136633
Considering they are a part of the w3c spec http://www.w3.org/TR/notifications/#api and are very likely relied upon by developers, we should have a clear deprecation path instead of straight removal. I don't know if we have established processes for this, but at the least the first step is adding deprecation warnings when it is used.
What we _really_ want to remove is the system messages. This should be reasonnably safe to do.

For the onshow/onclose events, I agree.
A migration path could be that if the app does not register onclose, do not send the system message, and if they do, onclose would print a deprecation warning but still allow it for a window. Same with onshow. 

That works for the email app, as it does not bind an onclose listener now.
I don't think this is possible currently, given how the notification subsystem works.
See Also: → 1141014
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Type: defect → task
Keywords: site-compat
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.