Support for "modal result" which is set via calling modal.hide() method with parameter

Allow passing an arbitrary parameter to modal.hide() method which is
accessible as event object property in 'hide' and 'hidden' events