MCPcopy
hub / github.com/wavetermdev/waveterm / RegisterComponent

Method RegisterComponent

pkg/vdom/vdom_root.go:160–166  ·  view source on GitHub ↗
(name string, cfunc any)

Source from the content-addressed store, hash-verified

158}
159
160func (r *RootElem) RegisterComponent(name string, cfunc any) error {
161 if err := validateCFunc(cfunc); err != nil {
162 return err
163 }
164 r.CFuncs[name] = cfunc
165 return nil
166}
167
168func (r *RootElem) Render(elem *VDomElem) {
169 r.render(elem, &r.Root)

Callers 1

Test1Function · 0.45

Calls 1

validateCFuncFunction · 0.70

Tested by 1

Test1Function · 0.36