title: Notification onclick - Open a link in new tab and focus
body: <pre><code>function spawnNotification(theBody, theIcon, theTitle, theLink) {
    var options = {
      body: theBody,
      icon: theIcon
    }
    var notification = new Notification(theTitle, options);
    notification.onclick = function() { 
      var myWindow = window.open(theLink,"_blank");
      myWindow.focus();
    };
    setTimeout(notification.close.bind(notification), 4000);
  }
  </code></pre>
  
  <p>I am trying to open a new tab and to focus it , when the notification box is clicked. </p>
  
  <p>I am using the above fuction to open a link in a new tab and to focus on that newly opened tab. But its not working.</p>
  
  <p>New tab is opened, but the focus remains on the old tab itself. How can I solve this?</p>