MCPcopy
hub / github.com/autoNumeric/autoNumeric / _getFormHandlerKey

Method _getFormHandlerKey

src/AutoNumeric.js:1462–1473  ·  view source on GitHub ↗

* Return the form handler key name from the parent form element, for the global form handler list. * * @returns {string} * @private

()

Source from the content-addressed store, hash-verified

1460 * @private
1461 */
1462 _getFormHandlerKey() {
1463 if (!this._hasFormHandlerFunction()) {
1464 AutoNumericHelper.throwError(`Unable to retrieve the form handler name`);
1465 }
1466
1467 const formHandlerName = this.parentForm.dataset.anFormHandler;
1468 if (formHandlerName === '') {
1469 AutoNumericHelper.throwError(`The form handler name is invalid`);
1470 }
1471
1472 return formHandlerName;
1473 }
1474
1475 /**
1476 * Return the 'submit' event handler function used for the parent form.

Callers 2

Calls 2

throwErrorMethod · 0.80

Tested by

no test coverage detected