@remixproject/plugin-webworker
TypeScript icon, indicating that this package has built-in type declarations

0.3.38 • Public • Published

Plugin Webworker

This library provides connectors to connect a plugin to an engine that can load webworkers.

npm install @remixproject/plugin-webworker

If you do not expose any API you can create an instance like this :

import { createClient } from '@remixproject/plugin-webworker'

const client = createClient()
client.onload(async () => {
  const data = client.call('filemanager', 'readFile', 'ballot.sol')
})

If you need to expose an API to other plugin you need to extends the class:

import { createClient } from '@remixproject/plugin-webworker'
import { PluginClient } from '@rexmixproject/plugin'

class MyPlugin extends PluginClient {
  methods = ['hello']
  hello() {
    console.log('Hello World')
  }
}
const client = createClient()
client.onload(async () => {
  const data = client.call('filemanager', 'readFile', 'ballot.sol')
})

Readme

Keywords

none

Package Sidebar

Install

npm i @remixproject/plugin-webworker

Weekly Downloads

4

Version

0.3.38

License

none

Unpacked Size

4.28 kB

Total Files

8

Last publish

Collaborators

  • grandschtroumpf
  • yann300
  • lianahus
  • aniket-engg
  • bunsenstraat
  • ioedeveloper