Worklet

open class Worklet(source)

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.

MDN Reference

Inheritors

Functions

Link copied to clipboard
inline suspend fun Worklet.addModule(moduleURL: String)
inline suspend fun Worklet.addModule(moduleURL: String, options: WorkletOptions)

The addModule() method of the adds it to the current Worklet.

inline suspend fun Worklet.addModule(moduleURL: URL)
inline suspend fun Worklet.addModule(moduleURL: URL, options: WorkletOptions)
Link copied to clipboard
fun addModuleAsync(moduleURL: String, options: WorkletOptions = definedExternally): Promise<Void>

The addModule() method of the adds it to the current Worklet.

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