Answers for "js desktop notification"

0

js desktop notification

notify(message = '', title = '', logoUrl, redirectUrl) {
    Notification.requestPermission().then((result) => {
      console.log(result);
      const notification = new Notification(title, {
        icon: logoUrl,
        body: message,
      });
      notification.onclick = () => {
        window.open(redirectUrl);
      };
    });
  }
Posted by: Guest on July-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language