add support for onShow and onClose for behaviors