Bug 280766 - Notifications API: support for the `close` method
Summary: Notifications API: support for the `close` method
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: Safari 18
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-10-02 10:14 PDT by ik
Modified: 2024-10-09 10:15 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ik 2024-10-02 10:14:13 PDT
MDN lists the Notifications API's `close()` method as supported in iOS Safari 16.4 but this isn't true. Calling the `close()` function doesn't do anything (doesn't throw either).

I used Peter Beverloo's excellent Notification Generator and some additional local testing to confirm my findings:
https://tests.peter.sh/notification-generator/

You can also use my own little (simplified) test case:
https://testcase.rejh.nl/testcase-notifications-api/

MDN compat table:
https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API#browser_compatibility

MDN `close()`:
https://developer.mozilla.org/en-US/docs/Web/API/Notification/close
Comment 1 Radar WebKit Bug Importer 2024-10-09 10:15:20 PDT
<rdar://problem/137605176>