mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(dom) notify
This commit is contained in:
parent
9e73fc9482
commit
50f259bea2
1 changed files with 3 additions and 4 deletions
|
|
@ -643,8 +643,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
};
|
||||
},
|
||||
NotifyProto = function() {
|
||||
var Notify = this,
|
||||
Show = false;
|
||||
var Show, Notify = this;
|
||||
|
||||
Events.add({
|
||||
'blur' :function() {
|
||||
|
|
@ -665,7 +664,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.check = function () {
|
||||
var ret,
|
||||
Not = Notification,
|
||||
perm = Not.permission;
|
||||
perm = Not && Not.permission;
|
||||
|
||||
if (perm === 'granted')
|
||||
ret = true;
|
||||
|
|
@ -674,7 +673,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
};
|
||||
|
||||
this.request = function () {
|
||||
var Not = Notification;
|
||||
var Not = window.Notification;
|
||||
|
||||
if (Not)
|
||||
Not.requestPermission();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue