Merge pull request #4364 from Tyriar/dom_remove

Replace dom helper with HTMLElement.remove()
This commit is contained in:
Daniel Imms
2023-01-05 09:22:55 -08:00
committed by GitHub
6 changed files with 8 additions and 59 deletions
@@ -3,7 +3,6 @@
* @license MIT
*/
import { removeElementFromParent } from 'browser/Dom';
import { acquireTextureAtlas } from 'browser/renderer/shared/CharAtlasCache';
import { TEXT_BASELINE } from 'browser/renderer/shared/Constants';
import { tryDrawCustomChar } from 'browser/renderer/shared/CustomGlyphs';
@@ -74,7 +73,7 @@ export abstract class BaseRenderLayer extends Disposable implements IRenderLayer
}));
this.register(toDisposable(() => {
removeElementFromParent(this._canvas);
this._canvas.remove();
this._charAtlas?.dispose();
}));
}