()
| 300 | } |
| 301 | |
| 302 | func (c *Client) incrementalRender() (*vdom.VDomBackendUpdate, error) { |
| 303 | c.Root.RunWork() |
| 304 | renderedVDom := c.Root.MakeVDom() |
| 305 | if renderedVDom == nil { |
| 306 | renderedVDom = makeNullVDom() |
| 307 | } |
| 308 | return &vdom.VDomBackendUpdate{ |
| 309 | Type: "backendupdate", |
| 310 | Ts: time.Now().UnixMilli(), |
| 311 | BlockId: c.RpcContext.BlockId, |
| 312 | RenderUpdates: []vdom.VDomRenderUpdate{ |
| 313 | {UpdateType: "root", VDom: renderedVDom}, |
| 314 | }, |
| 315 | RefOperations: c.Root.GetRefOperations(), |
| 316 | StateSync: c.Root.GetStateSync(false), |
| 317 | }, nil |
| 318 | } |
| 319 | |
| 320 | func (c *Client) RegisterUrlPathHandler(path string, handler http.Handler) { |
| 321 | c.UrlHandlerMux.Handle(path, handler) |
no test coverage detected