DigitMagazine

sendDesktopNotification function

Mar 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function sendDesktopNotification(ntfnTitle, ntfnBody, myFunc) {
  2. let myNotification = new Notification(ntfnTitle, {
  3. body: ntfnBody
  4. })
  5. if (myFunc) {
  6. myNotification.onclick = myFunc;
  7. }
  8. }
Add Comment
Please, Sign In to add comment