Add cancelable option for cancel CustomEvent

The cancel event is allowed to do prevent default action to stop the dialog from closing on pressing Esc. 
It is missing the cancelable option from the CustomEvent in cancelDialog() but allowed with the initEvent fallback.
Merge pull request #22 from XiXora/patch-1

Add cancelable option for cancel CustomEvent