After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`).
So, probably is better to utilize the base-component to do the same job.
*/
import Data from './dom/data'
+import EventHandler from './dom/event-handler'
/**
* ------------------------------------------------------------------------
dispose() {
Data.remove(this._element, this.constructor.DATA_KEY)
+ EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`)
this._element = null
}
}
dispose() {
- EventHandler.off(this._element, EVENT_KEY)
-
this._items = null
this._config = null
this._interval = null
}
dispose() {
- EventHandler.off(this._element, EVENT_KEY)
this._menu = null
if (this._popper) {
}
dispose() {
- [window, this._element, this._dialog]
+ [window, this._dialog]
.forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))
super.dispose()
this._element.classList.remove(CLASS_NAME_SHOW)
}
- EventHandler.off(this._element, EVENT_CLICK_DISMISS)
-
super.dispose()
this._config = null
}
dispose() {
clearTimeout(this._timeout)
- EventHandler.off(this._element, this.constructor.EVENT_KEY)
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)
if (this.tip && this.tip.parentNode) {