如何使用firefox addon sdk添加多个桌面通知?

时间:2014-01-23 09:32:43

标签: firefox-addon firefox-addon-sdk

我需要创建一种简单的方法,使用附加组件中的firefox sdk在桌面上推出多个通知。

我的代码是:

notifications.notify({
  title: "Jabberwocky  ",
  text: "Twas brillig, and the slithy toves  ",
  data: "did gyre and gimble in the wabe  ",
  onClick: function(data) {
    console.log("click data: "+data);
    // console.log(this.data) would produce the same result.
  }
});

它运行良好,但没有在for循环中工作。

1 个答案:

答案 0 :(得分:2)

Bug 935507开始,SDK通知不会叠加。有关如何处理多个通知的讨论(bug 616636),因为这是一个奇怪的用户体验问题。可能有一种更好的方式来显示信息,而不是将一堆东西循环到桌面。你的目标是什么?