Introduce removeElementFromParent helper
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) 2020 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
export function removeElementFromParent(...elements: (HTMLElement | undefined)[]): void {
|
||||
for (const e of elements) {
|
||||
e?.parentElement?.removeChild(e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user