Firefox addon - Notification bar with timer
In a Firefox add-on, I would l开发者_JAVA百科ike to set a temporary notification the top notification bar. By temporary, I mean that the notification would disappear after a couple seconds. Is this something possible?
Thank you.
Notifications don't have an automatic timeout, but you can set your own timeout and call removeNotification
to remove it.
var box = bar.appendNotification(label, value, image, priority, buttons);
setTimeout(function() { bar.removeNotification(box); }, delay);
精彩评论