Fix : test code

This commit is contained in:
2018-12-11 11:05:04 +09:00
parent 9008ae054b
commit f9323f87b8
+3
View File
@@ -85,11 +85,13 @@
if("Notification" in window) { if("Notification" in window) {
if(Notification) { // prepared browser for using Notification if(Notification) { // prepared browser for using Notification
if(Notification.permission === "granted") { if(Notification.permission === "granted") {
console.log("Notification - grated");
AddNotifyEventByNotification(timeLeft); AddNotifyEventByNotification(timeLeft);
return; return;
} }
Notification.requestPermission(function (result) { Notification.requestPermission(function (result) {
console.log("result : " + result);
Notification.permission = result; Notification.permission = result;
if(result === "granted") { if(result === "granted") {
@@ -97,6 +99,7 @@
return; return;
} }
console.log("Notification - not grated : " + result);
AddNotifyEventByAlert(timeLeft); AddNotifyEventByAlert(timeLeft);
}); });
} else { // not prepared browser for using Notification } else { // not prepared browser for using Notification