var notification = new Notification(theTitle, options);
notification.onclick = function() {
window.location.href = theLink; //redirects to the specified link
};
I am trying to open a new tab by clicking the notification box. Using the above code the redirection works fine. But I want to open the link in a new tab. How Can I do this?
notification.onclick = function() {
window.open(theLink);
};
try window.open("page url") hope it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With