You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
engine: initial interface for restoring instance state (implementation WIP)
(TODO: write more about this approach)
- - -
**Note on client interface:**
I’d hoped that restoring instance state would be synchronous (from `LoadFormResult` and its implementations). In hindsight it makes sense that this is not possible: instance XML is stored there as a `File` in `InstanceData` (`FormData`). Reading `File` data synchronously would likely need to go through [`FileReaderSync`](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync), which can’t be used on the main thread.
This isn’t a huge deal in any case, as we can expect the non-restore edit case to be async as well.
Open question: is it better, for _consistency_ to make the synchronous `LoadFormResult.createInstance` signature return `Promise<CreatedFormInstance>`? Asynchrony there would be superfluous, but it might be nice for clients to have symmetry across calls to these similar APIs.
0 commit comments