fromTemplateAsync
Asynchronously creates a TemplateBundle from a template binary data. This method avoids blocking the main thread.
Syntax
Harmony
Parameters
template: ArrayBuffer, a buffer of template binary data.
Return
- A promise that resolves with a new TemplateBundle object.
Note
- Due to ArkTS being restricted to run on the app’s main thread, we provide an asynchronous TemplateBundle creation API to reduce blocking time from main-thread I/O operations. On other platforms, developers can decide whether to run on a background thread without requiring a special asynchronous API.
Compatibility
LCD tables only load in the browser