@wordpress/dom
Version:
DOM utilities module for WordPress.
13 lines • 526 B
TypeScript
/**
* Check whether the current document has selected text. This applies to ranges
* of text in the document, and not selection inside `<input>` and `<textarea>`
* elements.
*
* See: https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects.
*
* @param {Document} doc The document to check.
*
* @return {boolean} True if there is selection, false if not.
*/
export default function documentHasTextSelection(doc: Document): boolean;
//# sourceMappingURL=document-has-text-selection.d.ts.map