MCPcopy Create free account
hub / github.com/hoothin/UserScripts / getActiveElement

Function getActiveElement

Picviewer CE+/dist.user.js:27360–27370  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

27358 }
27359
27360 function getActiveElement(root) {
27361 const activeEl = root.activeElement;
27362 if (!activeEl) {
27363 return null;
27364 }
27365 if (activeEl.shadowRoot) {
27366 return getActiveElement(activeEl.shadowRoot);
27367 } else {
27368 return activeEl;
27369 }
27370 }
27371
27372 function inputActive(doc) {
27373 let activeEl = getActiveElement(doc);

Callers 1

inputActiveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected