MCPcopy Create free account
hub / github.com/dethcrypto/dethcode / hasFocus

Function hasFocus

packages/vscode-host/src/src/vs/workbench/browser/layout.ts:972–981  ·  view source on GitHub ↗
(part: Parts)

Source from the content-addressed store, hash-verified

970 }
971
972 hasFocus(part: Parts): boolean {
973 const activeElement = document.activeElement;
974 if (!activeElement) {
975 return false;
976 }
977
978 const container = this.getContainer(part);
979
980 return !!container && isAncestorUsingFlowTo(activeElement, container);
981 }
982
983 focusPart(part: Parts): void {
984 switch (part) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected