@leafer/worker
Full package, includes @leafer-ui/worker and all @leafer-in/* plugin packages.
web version worker version node version mini program version
Runs in a Web Worker multithreaded background environment and cannot operate the DOM.
The web version and worker version can coexist in the same project and be used together as needed.
Installation
sh
npm install @leafer/workersh
pnpm add @leafer/workersh
yarn add @leafer/workersh
bun add @leafer/workerOr import via importScripts
Access internal features through the global variable LeaferUI.
js
importScripts('https://unpkg.com/@leafer/worker@2.1.0/dist/worker.min.js')js
importScripts('https://unpkg.com/@leafer/worker@2.1.0/dist/worker.js')Update
Learn how to quickly update versions.
Usage
The usage, global variables, and @leafer-ui/worker are the same. You only need to change the package name to run the official example code.