Closed kippo closed 4 years ago
I've added this and it will release in the next version.
Technically the ordering of "on..." events is crazy—if you set an oncancel property, it gets inserted in the list of events added by addEventListener
. I've not done this, instead just calling it first if it exists.
The oncancel listener doesn't fire an event when the modal is cancelled through either dialog.close or using the escape key. Tested in firefox but assuming this doesn't work in either IE or Safari as well.