Limited availability
ã¡ã¢: ãã®æ©è½ã¯ãµã¼ãã¹ã¯ã¼ã«ã¼å ã§ã®ã¿å©ç¨å¯è½ã§ãã
notification
㯠NotificationEvent
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ãã¯ãªãã¯ããã¦ã¤ãã³ããçºè¡ãã Notification
ã®ã¤ã³ã¹ã¿ã³ã¹ãè¿ãã¾ãã Notification
㯠tag
ã data
屿§ãªã©ã Notification ã®ã¤ã³ã¹ã¿ã³ã¹åæã«è¨å®ãããå¤ãã®ããããã£ã¸ã®èªã¿åãå°ç¨ã¢ã¯ã»ã¹ãæä¾ãã¦ããããã¨ã§ notificationclick
ã¤ãã³ãã§ä½¿ç¨ããããã®æ
å ±ãä¿åãããã¨ãã§ãã¾ãã
Notification
ãªãã¸ã§ã¯ãã
self.addEventListener("notificationclick", (event) => {
console.log("On notification click");
// éç¥ã«ãã¼ã¿ãæ·»ä»ãããã¨ã§ãnotificationclick ãã³ãã©ã¼ã§
// å¦çãããã¨ãã§ãã
console.log(`éç¥ã¿ã°: ${event.notification.tag}`);
console.log(`éç¥ãã¼ã¿: ${event.notification.data}`);
event.notification.close();
// ããã¯ããã§ã«éãã¦ãããã©ããã調ã¹ã¦ãéãã¦ããå ´åã¯
// ãã©ã¼ã«ã¹ãã
event.waitUntil(
clients
.matchAll({
type: "window",
})
.then((clientList) => {
for (const client of clientList) {
if (client.url === "/" && "focus" in client) return client.focus();
}
if (clients.openWindow) return clients.openWindow("/");
}),
);
});
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4