isClickableInput.js 495 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.isClickableInput = isClickableInput;
  6. var _isElementType = require("../misc/isElementType");
  7. const CLICKABLE_INPUT_TYPES = ['button', 'color', 'file', 'image', 'reset', 'submit', 'checkbox', 'radio'];
  8. function isClickableInput(element) {
  9. return (0, _isElementType.isElementType)(element, 'button') || (0, _isElementType.isElementType)(element, 'input') && CLICKABLE_INPUT_TYPES.includes(element.type);
  10. }