diff options
author | Johann-S <johann.servoire@gmail.com> | 2020-11-20 13:13:11 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-11-29 21:58:26 +0300 |
commit | 9eb9d02084dc914e614e8844e3ffdee4d0a25126 (patch) | |
tree | 4c6722f81a9336921b85879aff41bc748ff12a2b /js/src/base-component.js | |
parent | 51a208f119522f8618801a6e61ff8d47cf89d4cf (diff) |
add dispose in base component
Diffstat (limited to 'js/src/base-component.js')
-rw-r--r-- | js/src/base-component.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/src/base-component.js b/js/src/base-component.js index a6c7f36bde..b1b85a4ee7 100644 --- a/js/src/base-component.js +++ b/js/src/base-component.js @@ -17,6 +17,11 @@ class BaseComponent { Data.setData(element, this.constructor.DATA_KEY, this) } + dispose() { + Data.removeData(this._element, this.constructor.DATA_KEY) + this._element = null + } + /** Static */ static getInstance(element) { |