(pattern string, fn func(http.ResponseWriter, *http.Request))
| 393 | } |
| 394 | |
| 395 | func (c *ClientImpl) HandleDynFunc(pattern string, fn func(http.ResponseWriter, *http.Request)) { |
| 396 | if !strings.HasPrefix(pattern, "/dyn/") { |
| 397 | log.Printf("invalid dyn pattern: %s (must start with /dyn/)", pattern) |
| 398 | return |
| 399 | } |
| 400 | c.UrlHandlerMux.HandleFunc(pattern, fn) |
| 401 | } |
| 402 | |
| 403 | func (c *ClientImpl) RunEvents(events []vdom.VDomEvent) { |
| 404 | for _, event := range events { |