MCPcopy Index your code
hub / github.com/DHTMLX/gantt / activeElt

Function activeElt

samples/common/codehighlight/codemirror.js:114–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 }
113
114 function activeElt() {
115 // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
116 // IE < 10 will throw when accessed while the page is loading or in an iframe.
117 // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
118 var activeElement;
119 try {
120 activeElement = document.activeElement;
121 } catch(e) {
122 activeElement = document.body || null;
123 }
124 while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
125 { activeElement = activeElement.shadowRoot.activeElement; }
126 return activeElement
127 }
128
129 function addClass(node, cls) {
130 var current = node.className;

Callers 10

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

Calls

no outgoing calls

Tested by

no test coverage detected