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);
});
CONTEXT :
chrome.extension.sendMessage({
message: "Fetching stuff from " + thestuffname},
function(response) {
return response;
});
을 @kdrureidy 고마워! 광고 된대로 작동합니다. 다음으로, Ajax 호출이 성공적으로 완료되었을 때 통지를 취소하는 방법이 될 것이다. – user1452893
나는 당신에게 행운을 빌어. – kdureidy