做的事情後,我運行此代碼: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