MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / hasSelectionCapabilities

Function hasSelectionCapabilities

code/new-context-api/public/app.js:5867–5870  ·  view source on GitHub ↗

* @ReactInputSelection: React input selection module. Based on Selection.js, * but modified to be suitable for react and has a couple of bug fixes (doesn't * assume buttons have range selections allowed). * Input selection module for React.

(elem)

Source from the content-addressed store, hash-verified

5865 */
5866
5867function hasSelectionCapabilities(elem) {
5868 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
5869 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
5870}
5871
5872function getSelectionInformation() {
5873 var focusedElem = getActiveElement();

Callers 3

getSelectionInformationFunction · 0.70
restoreSelectionFunction · 0.70
getSelectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected