* Detach the current AutoNumeric element from the shared local 'init' list. * This means any changes made on that local shared list will not be transmitted to that element anymore. * Note : The user can provide another AutoNumeric element, and detach this one instead of the current one.
(otherAnElement = null)
| 2844 | * @returns {AutoNumeric} |
| 2845 | */ |
| 2846 | detach(otherAnElement = null) { //FIXME test this |
| 2847 | let domElementToDetach; |
| 2848 | if (!AutoNumericHelper.isNull(otherAnElement)) { |
| 2849 | domElementToDetach = otherAnElement.node(); |
| 2850 | } else { |
| 2851 | domElementToDetach = this.domElement; |
| 2852 | } |
| 2853 | |
| 2854 | this._removeFromLocalList(domElementToDetach); //FIXME What happens if the selected dom element does not exist in the list? |
| 2855 | |
| 2856 | return this; |
| 2857 | } |
| 2858 | |
| 2859 | /** |
| 2860 | * Attach the given AutoNumeric element to the shared local 'init' list. |
no test coverage detected