mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 00:54:04 +02:00
dist v5
This commit is contained in:
12
js/dist/toast.js
vendored
12
js/dist/toast.js
vendored
@@ -204,7 +204,11 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
EventHandler.trigger(this._element, Event.SHOW);
|
||||
var showEvent = EventHandler.trigger(this._element, Event.SHOW);
|
||||
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(ClassName.FADE);
|
||||
@@ -244,7 +248,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
EventHandler.trigger(this._element, Event.HIDE);
|
||||
var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
_this2._element.classList.add(ClassName.HIDE);
|
||||
|
Reference in New Issue
Block a user