MCPcopy
hub / github.com/autoNumeric/autoNumeric / _setWritePermissions

Method _setWritePermissions

src/AutoNumeric.js:1509–1515  ·  view source on GitHub ↗

* Set the DOM element write permissions according to the current settings, by setting the `readonly` or `contenteditable` attributes depending on its tag type. * If the `useHtmlAttribute` parameter is set to `true`, then the `readonly` html attribute is used and has precedence over the `readOnl

(useHtmlAttribute = false)

Source from the content-addressed store, hash-verified

1507 * @private
1508 */
1509 _setWritePermissions(useHtmlAttribute = false) {
1510 if ((useHtmlAttribute && this.domElement.readOnly) || this.settings.readOnly) {
1511 this._setReadOnly();
1512 } else {
1513 this._setReadWrite();
1514 }
1515 }
1516
1517 /**
1518 * Set the element to be read-only.

Callers 2

constructorMethod · 0.95
updateMethod · 0.95

Calls 2

_setReadOnlyMethod · 0.95
_setReadWriteMethod · 0.95

Tested by

no test coverage detected