I am new to Chrome app envelopment as well as to javascript and trying to build a notification feature in chrome app with the help of this doc. Below is the cod of my js file
var app=new function(){
var notification = webkitNotifications.createNotification(
'128.png', // icon url - can be relative
'Hello!', // notification title
'Lorem ipsum...' // notification body text
);
notification.show();
};
But it gives me a "Uncaught ReferenceError: webkitNotifications is not defined" error at the second line. How should i define this webkitNotifications?