addModuleAsync

fun addModuleAsync(moduleURL: String, options: WorkletOptions = definedExternally): Promise<Void?>(source)

The addModule() method of the Worklet interface loads the module in the given JavaScript file and adds it to the current Worklet.

MDN Reference


fun addModuleAsync(moduleURL: URL, options: WorkletOptions = definedExternally): Promise<Void?>(source)
fun addModuleAsync(module: M, options: WorkletOptions = definedExternally): Promise<Void?>(source)