- Affected Version
- WoltLab Suite 5.3
- Affected App
- WoltLab Suite Core
QuoteFailed to construct 'Notification': Illegal constructor. Use ServiceWorkerRegistration.showNotification() instead.
Chrome Mobile auf Android unterstützt new Notification() bereits seit langer Zeit nicht mehr, siehe https://bugs.chromium.org/p/chromium/issues/detail?id=481856.
Wir haben derzeit eine Menge Einträge von Chrome Mobile Android sowie Samsung Internet Android, stammend von /js/WoltLabSuite/Core/Notification/Handler.js:
JavaScript: Handler.js
//noinspection JSUnresolvedVariable
var notification = new window.Notification(pollData.notification.title, {
body: StringUtil.unescapeHTML(pollData.notification.message).replace(/ /g, "\u202F"),
icon: _icon
});
notification.onclick = function () {
window.focus();
notification.close();
//noinspection JSUnresolvedVariable
window.location = pollData.notification.link;
};
Display More
Einziger Workaround ohne das Setzen auf ServiceWorkers scheint ein try-catch mit Prüfung auf den spezifischen Fehler zu sein.