Baseline Widely available *
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The Worklet
interface is a lightweight version of Web Workers and gives developers access to low-level parts of the rendering pipeline.
With Worklets, you can run JavaScript and WebAssembly code to do graphics rendering or audio processing where high performance is required.
Worklets allow static import of ECMAScript modules, if supported, using import
. Dynamic import is disallowed by the specification â calling import()
will throw.
Worklets are restricted to specific use cases; they cannot be used for arbitrary computations like Web Workers. The Worklet
interface abstracts properties and methods common to all kind of worklets, and cannot be created directly. Instead, you can use one of the following classes:
Note: Paint worklets, defined by the CSS Painting API, don't subclass Worklet
. They are accessed through a regular Worklet
object obtained using CSS.paintWorklet
.
For 3D rendering with WebGL, you don't use worklets. Instead, you write vertex shaders and fragment shaders using GLSL code, and those shaders will then run on the graphics card.
Instance propertiesThe Worklet interface does not define any properties.
Instance methodsWorklet.addModule()
Adds the script module at the given URL to the current worklet.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3