MCPcopy Create free account
hub / github.com/breck7/scroll / activeElt

Function activeElt

external/.scrollLibs.js:602–616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

600 }
601
602 function activeElt() {
603 // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
604 // IE < 10 will throw when accessed while the page is loading or in an iframe.
605 // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
606 var activeElement
607 try {
608 activeElement = document.activeElement
609 } catch (e) {
610 activeElement = document.body || null
611 }
612 while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) {
613 activeElement = activeElement.shadowRoot.activeElement
614 }
615 return activeElement
616 }
617
618 function addClass(node, cls) {
619 var current = node.className

Callers 9

endOperation_W2Function · 0.85
selectionSnapshotFunction · 0.85
restoreSelectionFunction · 0.85
onKeyDownFunction · 0.85
leftButtonDownFunction · 0.85
extendFunction · 0.85
addEditorMethodsFunction · 0.85
.scrollLibs.jsFile · 0.85
fromTextAreaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected