Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome extension Desktop notification

I am working on a chrome extension for desktop notification.Is there any way by which I can close the desktop notification after a specified time ?

like image 744
Hector Barbossa Avatar asked Feb 13 '11 17:02

Hector Barbossa


1 Answers

If you have a reference of the notification object, you can use notification.cancel instead:

  setTimeout(function() { 
      notification.cancel(); 
  }, 5000);

References:

  • Chrome extension development: auto close the notification box
  • http://dev.chromium.org/developers/design-documents/desktop-notifications/api-specification
like image 173
newtonapple Avatar answered Oct 31 '22 01:10

newtonapple