Replace dom helper with HTMLElement.remove()

This commit is contained in:
Daniel Imms
2023-01-05 09:14:16 -08:00
parent 1a20fbb25f
commit b3fb8db6b3
6 changed files with 8 additions and 59 deletions
+2 -3
View File
@@ -12,7 +12,6 @@ import { addDisposableDomListener } from 'browser/Lifecycle';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { ScreenDprMonitor } from 'browser/ScreenDprMonitor';
import { IRenderService } from 'browser/services/Services';
import { removeElementFromParent } from 'browser/Dom';
const MAX_ROWS_TO_READ = 20;
@@ -105,7 +104,7 @@ export class AccessibilityManager extends Disposable {
// media query that drives the ScreenDprMonitor isn't supported
this.register(addDisposableDomListener(window, 'resize', () => this._refreshRowsDimensions()));
this.register(toDisposable(() => {
removeElementFromParent(this._accessibilityTreeRoot);
this._accessibilityTreeRoot.remove();
this._rowElements.length = 0;
}));
}
@@ -240,7 +239,7 @@ export class AccessibilityManager extends Disposable {
// Only detach/attach on mac as otherwise messages can go unaccounced
if (isMac) {
removeElementFromParent(this._liveRegion);
this._liveRegion.remove();
}
}