UNPKG

@gechiui/dom

Version:
15 lines 666 B
/** * Check whether the given element, assumed an input field or textarea, * contains a (uncollapsed) selection of text. * * Note: this is perhaps an abuse of the term "selection", since these elements * manage selection differently and aren't covered by Selection#collapsed. * * See: https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects. * * @param {Element} element The HTML element. * * @return {boolean} Whether the input/textareaa element has some "selection". */ export default function inputFieldHasUncollapsedSelection(element: Element): boolean; //# sourceMappingURL=input-field-has-uncollapsed-selection.d.ts.map