1
0
Fork 0
firefox/dom/notification/test/mochitest/create_notification.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
613 B
HTML

<!DOCTYPE html>
<html>
<head><meta charset=utf-8>
<title>Create a notification</title>
</head>
<body>
<script src="NotificationTest.js"></script>
<script>
// Can't use top level await because of eslint limitation
// https://github.com/BenoitZugmeyer/eslint-plugin-html/issues/139
(async () => {
await NotificationTest.allowNotifications();
let swr = await navigator.serviceWorker.register("notification_empty_sw.js");
await navigator.serviceWorker.ready;
await swr.showNotification("This is a title", {
body: "This is a notification body",
tag: "sometag",
});
})();
</script>
</body>
</html>