npm sweetalert2 11.14.0
v11.14.0

latest releases: 11.14.5, 11.14.4, 11.14.3...
2 months ago

11.14.0 (2024-09-09)

Fire global events that could be subscribed to (#2760)

Now you can do this:

// event handlers
Swal.on('didRender', (popup) => ...)
Swal.on('willOpen', (popup) => ...)
Swal.on('didOpen', (popup) => ...)
Swal.on('willClose', (popup) => ...)
Swal.on('didClose', () => ...)
Swal.on('didDestroy', () => ...)

// event handlers that will be executed at most once
Swal.once('didRender', (popup) => ...)
Swal.once('willOpen', (popup) => ...)
Swal.once('didOpen', (popup) => ...)
Swal.once('willClose', (popup) => ...)
Swal.once('didClose', () => ...)
Swal.once('didDestroy', () => ...)

Kudos to @getify for requesting and participation in implementing this feature ❤️

Don't miss a new sweetalert2 release

NewReleases is sending notifications on new releases.