Naturally Pacifist Marsupials
    Wondering what’s next for npm?Check out our public roadmap! »

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

    0.3.14 • Public • Published

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

    Keywords

    none

    Install

    npm i @remixproject/plugin-iframe

    DownloadsWeekly Downloads

    242

    Version

    0.3.14

    License

    MIT

    Unpacked Size

    9.73 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar