我需要创建一种简单的方法,使用附加组件中的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循环中工作。
答案 0 :(得分:2)
从Bug 935507开始,SDK通知不会叠加。有关如何处理多个通知的讨论(bug 616636),因为这是一个奇怪的用户体验问题。可能有一种更好的方式来显示信息,而不是将一堆东西循环到桌面。你的目标是什么?