Skip to content

Commit a968261

Browse files
author
kai
committed
Add remove method
1 parent 312b8b2 commit a968261

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/BaseComponent.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ export abstract class BaseComponent<T extends Element> {
171171
return this.element[name];
172172
}
173173

174+
/**
175+
* Remove the element
176+
*/
177+
public remove(): this {
178+
this.element.remove();
179+
return this;
180+
}
181+
174182
/**
175183
* Add event listener
176184
* @param type

0 commit comments

Comments
 (0)