UNPKG

483 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports["default"] = isSelectable;
7
8/**
9 * Check if an input type is selectable, based on WHATWG spec.
10 *
11 * See:
12 * - https://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome/24175357
13 * - https://html.spec.whatwg.org/multipage/input.html#do-not-apply
14 */
15function isSelectable(inputNode) {
16 return inputNode.selectionStart != null;
17}
\No newline at end of file