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
Post a Comment