javascript click event notifications

JavaScript
var message = new Notification("RandomString");
message.onclick = function(){
    alert("Random Message")
};
Source

Also in JavaScript: