Blame view

天文台pc/tianwentai-ui/node_modules/dom-helpers/cjs/isInput.js 376 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  "use strict";
  
  exports.__esModule = true;
  exports.default = isInput;
  var regExpInputs = /^(?:input|select|textarea|button)$/i;
  /**
   * Checks if a given element is an input (input, select, textarea or button).
   * 
   * @param node the element to check
   */
  
  function isInput(node) {
    return node ? regExpInputs.test(node.nodeName) : false;
  }
  
  module.exports = exports["default"];