()
| 372 | } |
| 373 | |
| 374 | func (c *ClientImpl) incrementalRender() (*rpctypes.VDomBackendUpdate, error) { |
| 375 | opts := &RenderOpts{Resync: false} |
| 376 | c.Root.RunWork(opts) |
| 377 | renderedVDom := c.Root.MakeRendered() |
| 378 | if renderedVDom == nil { |
| 379 | renderedVDom = makeNullRendered() |
| 380 | } |
| 381 | return &rpctypes.VDomBackendUpdate{ |
| 382 | Type: "backendupdate", |
| 383 | Ts: time.Now().UnixMilli(), |
| 384 | ServerId: c.ServerId, |
| 385 | HasWork: len(c.Root.EffectWorkQueue) > 0, |
| 386 | FullUpdate: false, |
| 387 | Opts: c.makeBackendOpts(), |
| 388 | RenderUpdates: []rpctypes.VDomRenderUpdate{ |
| 389 | {UpdateType: "root", VDom: renderedVDom}, |
| 390 | }, |
| 391 | RefOperations: c.Root.GetRefOperations(), |
| 392 | }, nil |
| 393 | } |
| 394 | |
| 395 | func (c *ClientImpl) HandleDynFunc(pattern string, fn func(http.ResponseWriter, *http.Request)) { |
| 396 | if !strings.HasPrefix(pattern, "/dyn/") { |
no test coverage detected