update notify interface (#45)

This commit is contained in:
Lynn
2017-03-28 17:04:21 -07:00
committed by GitHub
parent 1f149d62c2
commit 06e93cd9c3
5 changed files with 31 additions and 10 deletions

View File

@@ -45,16 +45,22 @@
body: body,
image: imageUrl,
flash: shouldFlash,
color: color || 'white'
color: color || 'white',
data: {
hello: 'hello word'
}
});
notf.addEventListener('click', function() {
alert('notification clicked');
notf.addEventListener('click', function(event) {
event.target.data.then(function(value) {
alert('notification clicked: ' + value.hello);
})
});
notf.addEventListener('close', function() {
alert('notification closed');
});
});
var badgeCount = 0;