your implementation
Notification.requestPermission = function(callback) {
if (typeof callback === 'function') {
callback();
return true
} else {
return true
}
};
while I think the following codes should be more suitable for real environment
Notification.requestPermission = function(callback) {
if (typeof callback === 'function') {
callback('granted');
}
};
your implementation
while I think the following codes should be more suitable for real environment