code: function setNotificationCallback(createCallback, clickCallback) {
    const OldNotify = window.Notification;
    const newNotify = (title, opt) => {
      createCallback(title, opt);
      const instance = new OldNotify(title, opt);
      instance.addEventListener('click', clickCallback);
      return instance;
    };
    newNotify.requestPermission = OldNotify.requestPermission.bind(OldNotify);
    Object.defineProperty(newNotify, 'permission', {
      get: () => OldNotify.permission,
    });
  
    window.Notification = newNotify;
  }
docs: Patches window.Notification to:
  - set a callback on a new Notification
  - set a callback for clicks on notifications
  @param createCallback
  @param clickCallback