Prevent XUL notificationBox from closing when button is hit

Viewed 58

I have a problem concerning the notificationBox. I create a notification using

appendNotification( label , value , image , priority , buttons, eventCallback )

and supply a button in the buttons argument. Now, I want to prevent the notificationBox from closing when I hit the button. The XUL Documentation states that this can be done by throwing an error in the eventCallback function:

This callback can be used to prevent the notification box from closing on button click. In the callback function just throw an error. (For example: throw new Error('prevent nb close');)

This does not work for me, however, it works when I add the throw-statement to the callback function of the button itself.

  1. Is this a bug in XUL or an inconsistency with the documentation?
  2. Is there any harm done by adding it to the button's callback function?
1 Answers
Related