JSFiddle - React, Tailwind, and code Playground

by Dhanck

HTML

<div onclick="notifyMe()">
  Notify me!
</div>

JavaScript

function notifyMe() {
  if (!Notification) {
    alert('Notifications are supported in modern versions of Chrome, Firefox, Opera and Firefox.'); 
    return;
  }

  var notification = new Notification('Vermilion Message', {
    icon: 'http://elfinder.org/files/test2/notification-icon.png',
    body: "Hey there! You've been notified!",
  });
  
  
      
  
  if (Notification.permission !== "granted")
    {

    Notification.requestPermission();
     
    }
  
  
  

  notification.onclick = function () {
    window.open("lisa:9080/VermilionWeb/VRS4.jsp");      
  };
}