MCPcopy
hub / github.com/autoNumeric/autoNumeric / getAutoNumericElement

Method getAutoNumericElement

src/AutoNumeric.js:4677–4685  ·  view source on GitHub ↗

* Return the AutoNumeric object that manages the given DOM element. * This function also accepts a selector string. * * @param {HTMLElement|string} domElementOrSelector Accepts either directly a DOM element to test, or a string selector (that will return one and only one element, if a

(domElementOrSelector)

Source from the content-addressed store, hash-verified

4675 * @returns {null|AutoNumeric}
4676 */
4677 static getAutoNumericElement(domElementOrSelector) {
4678 const domElement = AutoNumericHelper.domElement(domElementOrSelector);
4679
4680 if (!this.isManagedByAutoNumeric(domElement)) {
4681 return null;
4682 }
4683
4684 return this._getFromGlobalList(domElement);
4685 }
4686
4687 /**
4688 * Set the given element value, and format it immediately.

Callers 15

setMethod · 0.95
_getMethod · 0.95
getLocalizedMethod · 0.95
_serializeMethod · 0.95
getNumericStringFunction · 0.80
setAutonumericValueFunction · 0.80
constructorMethod · 0.80
formUnformatMethod · 0.80
formUnformatLocalizedMethod · 0.80
formReformatMethod · 0.80

Calls 3

_getFromGlobalListMethod · 0.95
domElementMethod · 0.80

Tested by 2

getNumericStringFunction · 0.64
setAutonumericValueFunction · 0.64