// Add an element to this Component.
//
// You can add Groups, Teardowner, EventBinding, or None Node Elements
Add an element to this Component.

You can add Groups, Teardowner, EventBinding, or None Node Elements
// Add an element to this Component . // // You can add Groups Teardowner EventBinding or None Node Elements
func (list *ComponentList) Add(elements ...interface{}) {
	for i := 0; i < len(elements); i++ {
		switch v := elements[i].(type) {
		case *l.NodeGroup:
			g := v.Get()
			for j := 0; j < len(g); j++ {
				list.Add(g[j])
			}
		case l.Teardowner:
			list.AddItems(v)
		case *l.EventBinding:
			list.Component.Add(v)
		default:
			if l.IsNonNodeElement(v) {
				list.Tag.Add(v)
			} else {
				panic(fmt.Errorf("ComponentList.Add: element: %#v: %w", v, ErrInvalidListAdd))
			}
		}
	}
}
func ( list * ComponentList ) Add ( elements ... interface { } ) { for i := 0 ; i < len ( elements ) ; i ++ { switch v := elements [ i ] . ( type ) { case * l . NodeGroup : g := v . Get ( ) for j := 0 ; j < len ( g ) ; j ++ { list . Add ( g [ j ] ) } case l . Teardowner : list . AddItems ( v ) case * l . EventBinding : list . Component . Add ( v ) default : if l . IsNonNodeElement ( v ) { list . Tag . Add ( v ) } else { panic ( fmt . Errorf ( " " , v , ErrInvalidListAdd ) ) } } } }
Add an element to this Component.
Add an element to this Component .