Yes, you can show, check this code as a link.
manifest.json
Registered background page and permissions required for notifications
{ "name": "Notification with Link", "description": "http://stackoverflow.com/questions/14731996/how-to-include-a-link-in-a-webkit-notification", "manifest_version": 2, "version": "1", "permissions": [ "notifications" ], "background": { "scripts": [ "background.js" ] } }
background.js
HTML Notification Created
// create a HTML notification: var notification = webkitNotifications.createHTMLNotification( 'notification.html' // html url - can be relative ); // Then show the notification. notification.show();
notification.html
Script tag added to avoid CSP
<html> <head> <script src="notification.js"></script> </head> <body> <a id="click" href="http://www.google.co.in/">Click Me</a> </body> </html>
notification.js
Just by indicating a notification on click, you can use it to expand any functionality.
document.addEventListener("DOMContentLoaded", function () { document.getElementById("click").addEventListener("click", function () { console.log("Clicked"); }); });
References
source share