做的事情后,我运行此代码:Chrome扩展的发展:自动关闭通知框
var notification = webkitNotifications.createNotification(
'icon.png', // icon url - can be relative
'Done!', // notification title
'Just updated your list!' // notification body text
);
notification.show();
这当然会弹出一个通知到用户屏幕。
无论如何要这个通知的时间,以便自动关闭在X秒的时间?
谢谢! R
我喜欢'notification.cancel();',因为它可以从创建通知的相同函数中调用。 – smfoote 2011-06-28 17:13:46
谢谢!完全像我想要的一样! – Ryan 2011-07-03 16:35:36
可能有API的更新,现在应该使用notification.close()。 – William 2015-08-28 01:55:00