MCPcopy
hub / github.com/autoNumeric/autoNumeric / remove

Method remove

src/AutoNumeric.js:3053–3062  ·  view source on GitHub ↗

* Remove the autoNumeric data and event listeners from the element, but keep the element content intact. * This also clears the value from sessionStorage (or cookie, depending on browser supports). * Note: this does not remove the formatting. * * @example anElement.remove()

()

Source from the content-addressed store, hash-verified

3051 * @example anElement.remove()
3052 */
3053 remove() {
3054 this._removeValueFromPersistentStorage();
3055 this._removeEventListeners();
3056 this._removeWatcher();
3057
3058 // Also remove the element from the local AutoNumeric list
3059 this._removeFromLocalList(this.domElement);
3060 // Also remove the element from the global AutoNumeric list
3061 this.constructor._removeFromGlobalList(this);
3062 }
3063
3064 /**
3065 * Remove the autoNumeric data and event listeners from the element, and reset its value to the empty string ''.

Callers 6

wipeMethod · 0.95
nukeMethod · 0.95
constructorMethod · 0.80
_removeCSSClassMethod · 0.80

Calls 5

_removeEventListenersMethod · 0.95
_removeWatcherMethod · 0.95
_removeFromLocalListMethod · 0.95
_removeFromGlobalListMethod · 0.80

Tested by

no test coverage detected