MCPcopy Create free account
hub / github.com/microsoft/SandDance / hasSelectionCapabilities

Function hasSelectionCapabilities

docs/external/js/react-dom.development.js:7090–7093  ·  view source on GitHub ↗

* @hasSelectionCapabilities: we get the element types that support selection * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` * and `selectionEnd` rows.

(elem)

Source from the content-addressed store, hash-verified

7088
7089
7090 function hasSelectionCapabilities(elem) {
7091 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
7092 return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
7093 }
7094 function getSelectionInformation() {
7095 var focusedElem = getActiveElementDeep();
7096 return {

Callers 3

getSelectionInformationFunction · 0.85
restoreSelectionFunction · 0.85
getSelection$1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected