We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b99d85 commit 215bf94Copy full SHA for 215bf94
1 file changed
src/app/utils/dom.ts
@@ -233,7 +233,15 @@ export const notificationPermission = (permission: NotificationPermission) => {
233
if ('Notification' in window) {
234
return window.Notification.permission === permission;
235
}
236
- return false;
+ try {
237
+ // https://stackoverflow.com/questions/29774836/failed-to-construct-notification-illegal-constructor
238
+ // https://issues.chromium.org/issues/40415865
239
+ // eslint-disable-next-line no-new
240
+ new Notification('');
241
+ } catch {
242
+ return false;
243
+ }
244
+ return true;
245
};
246
247
export const getMouseEventCords = (event: MouseEvent) => ({
0 commit comments