Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@remixproject/plugin-iframe

Package Overview
Dependencies
Maintainers
6
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remixproject/plugin-iframe

**Except if you want your plugin to ONLY work on the web, prefer [@remixproject/plugin-webview](../webview)**

latest
Source
npmnpm
Version
0.3.38
Version published
Weekly downloads
58
-79.29%
Maintainers
6
Weekly downloads
 
Created
Source

Plugin frame

Except if you want your plugin to ONLY work on the web, prefer @remixproject/plugin-webview

This library provides connectors to connect a plugin to an engine running in a web environment.

npm install @remixproject/plugin-iframe

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

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

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-iframe'
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