Add 'onclose' callback to notifications