// Add an element to this Component.
//
// This is an easy way to add anything.
Add an element to this Component.

This is an easy way to add anything.
// Add an element to this Component . // // This is an easy way to add anything .
func (c *Component) Add(elements ...interface{}) {
	if c.IsNil() {
		return
	}
	for i := 0; i < len(elements); i++ {
		switch v := elements[i].(type) {
		case []interface{}:
			for j := 0; j < len(v); j++ {
				c.Add(v[j])
			}
		case *NodeGroup:
			if v == nil {
				continue
			}
			list := v.Get()
			for j := 0; j < len(list); j++ {
				c.Add(list[j])
			}
		case *ElementGroup:
			if v == nil {
				continue
			}
			list := v.Get()
			for j := 0; j < len(list); j++ {
				c.Add(list[j])
			}
		case *EventBinding:
			if v == nil {
				continue
			}
			c.on(v)
		default:
			c.Tag.Add(v)
		}
	}
}
func ( c * Component ) Add ( elements ... interface { } ) { if c . IsNil ( ) { return } for i := 0 ; i < len ( elements ) ; i ++ { switch v := elements [ i ] . ( type ) { case [ ] interface { } : for j := 0 ; j < len ( v ) ; j ++ { c . Add ( v [ j ] ) } case * NodeGroup : if v == nil { continue } list := v . Get ( ) for j := 0 ; j < len ( list ) ; j ++ { c . Add ( list [ j ] ) } case * ElementGroup : if v == nil { continue } list := v . Get ( ) for j := 0 ; j < len ( list ) ; j ++ { c . Add ( list [ j ] ) } case * EventBinding : if v == nil { continue } c . on ( v ) default : c . Tag . Add ( v ) } } }
Add an element to this Component.
Add an element to this Component .
// NoneNodeElements