0
我在超时时自动关闭消息。在下一个显示之前关闭当前通知?
但是,有些通知会在超时完成之前触发。
那么,如何在下一个显示之前关闭当前通知?
我只想在任何特定的时间显示一个。
背景:
chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
var notify = webkitNotifications.createNotification('icon-48.png', 'Notification', request.message);
notify.show();
setTimeout(function(){ notify.cancel(); },10000);
});
背景:
chrome.extension.sendMessage({
message: "Fetching stuff from " + thestuffname},
function(response) {
return response;
});
@kdrureidy谢谢!按广告方式工作。接下来,将介绍如何在Ajax调用成功完成时取消通知。 – user1452893
祝你好运:) – kdureidy