Javascript (Chrome extension) notification.cancel() is misbehaving -


this simple function:

            if (req.status == 200)             {                  var notification = webkitnotifications.createnotification(                   'icon.png',  // icon url - can relative                   'done!',  // notification title                   'just updated , saved latest blocklist'                   );                 notification.show();                 new_version_show_window();                 settimeout( function () {  notification.cancel(); }, 4000);               } 

basically ajax call, once downloads list shows notification,
if new install or upgrade calls ´new_version_show_window()´ , should close notification... not, does, not :(

in couldn't make cancel() work either. workaround created html notification following javascript:

settimeout( function () {  window.close(); }, 4000); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -