BootstrapDialog Events
v0.46.0Proposed by CMD_God
UnderScript wraps BootstrapDialog in a way that all of their dialog events call an event in the EventManager. Plugins can listen to them with plugin.events.
Events
All events have access to the dialog instance.
BootstrapDialog:create: Created dialogBootstrapDialog:preshow: Beforedialog.show()gets processed- Cancelable
BootstrapDialog:show: in the process of renderingBootstrapDialog:shown: finished rendering on screenBootstrapDialog:hide: in the process of hidingBootstrapDialog:hidden: finished hiding
Examples
plugin.events().on('BootstrapDialog:create', (dialog) => {
// Do stuff here, `dialog` was created.
});
plugin.events().on('BootstrapDialog:preshow', function (dialog) {
// Do stuff here, `dialog` is being shown.
this.canceled = true; // Now it wont show.
});