()
| 279 | } |
| 280 | |
| 281 | func (c *Client) fullRender() (*vdom.VDomBackendUpdate, error) { |
| 282 | c.Root.RunWork() |
| 283 | c.Root.Render(c.RootElem) |
| 284 | renderedVDom := c.Root.MakeVDom() |
| 285 | if renderedVDom == nil { |
| 286 | renderedVDom = makeNullVDom() |
| 287 | } |
| 288 | return &vdom.VDomBackendUpdate{ |
| 289 | Type: "backendupdate", |
| 290 | Ts: time.Now().UnixMilli(), |
| 291 | BlockId: c.RpcContext.BlockId, |
| 292 | HasWork: len(c.Root.EffectWorkQueue) > 0, |
| 293 | Opts: &c.Opts, |
| 294 | RenderUpdates: []vdom.VDomRenderUpdate{ |
| 295 | {UpdateType: "root", VDom: renderedVDom}, |
| 296 | }, |
| 297 | RefOperations: c.Root.GetRefOperations(), |
| 298 | StateSync: c.Root.GetStateSync(true), |
| 299 | }, nil |
| 300 | } |
| 301 | |
| 302 | func (c *Client) incrementalRender() (*vdom.VDomBackendUpdate, error) { |
| 303 | c.Root.RunWork() |
no test coverage detected