File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,16 @@ export abstract class BaseComponent<T extends Element> {
5656 /**
5757 * Insert component after the last child
5858 */
59- public append ( component : BaseComponent < any > ) {
60- this . element . appendChild ( component . element ) ;
59+ public append ( ... components : BaseComponent < any > [ ] ) {
60+ components . forEach ( ( component ) => this . element . appendChild ( component . element ) )
6161 return this ;
6262 }
6363
6464 /**
6565 * Insert component before the first child
6666 */
67- public prepend ( component : BaseComponent < any > ) {
68- this . element . prepend ( component . element ) ;
67+ public prepend ( ... components : BaseComponent < any > [ ] ) {
68+ components . forEach ( ( component ) => this . element . prepend ( component . element ) )
6969 return this ;
7070 }
7171
You can’t perform that action at this time.
0 commit comments