mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
aux window - avoid more global window (#195869)
* aux window - avoid more global `window` * aux window - avoid more global `document`
This commit is contained in:
@@ -602,14 +602,7 @@ export function getLargestChildWidth(parent: HTMLElement, children: HTMLElement[
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
export function isAncestor(testChild: Node | null, testAncestor: Node | null): boolean {
|
||||
while (testChild) {
|
||||
if (testChild === testAncestor) {
|
||||
return true;
|
||||
}
|
||||
testChild = testChild.parentNode;
|
||||
}
|
||||
|
||||
return false;
|
||||
return Boolean(testAncestor?.contains(testChild));
|
||||
}
|
||||
|
||||
const parentFlowToDataKey = 'parentFlowToElementId';
|
||||
|
||||
Reference in New Issue
Block a user