Worklet
The Worklet interface is a lightweight version of Web Workers and gives developers access to low-level parts of the rendering pipeline. Available only in secure contexts.
Inheritors
Functions
Link copied to clipboard
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: String, options: WorkletOptions)
inline suspend fun <M : WorkletModule> Worklet<M>.addModule(moduleURL: URL, options: WorkletOptions)
The addModule() method of the Worklet interface loads the module in the given JavaScript file and adds it to the current Worklet.
Link copied to clipboard
external fun addModuleAsync(moduleURL: String, options: WorkletOptions = definedExternally): Promise<Void>
external fun addModuleAsync(moduleURL: URL, options: WorkletOptions = definedExternally): Promise<Void>
The addModule() method of the Worklet interface loads the module in the given JavaScript file and adds it to the current Worklet.