开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜