Socket
Book a DemoInstallSign in
Socket

@remixproject/plugin-webworker

Package Overview
Dependencies
Maintainers
6
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remixproject/plugin-webworker

This library provides connectors to connect a plugin to an engine that can load webworkers. ``` npm install @remixproject/plugin-webworker ```

latest
Source
npmnpm
Version
0.3.38
Version published
Maintainers
6
Created
Source

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')
})

FAQs

Package last updated on 26 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts