New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@remixproject/engine-web

Package Overview
Dependencies
Maintainers
6
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remixproject/engine-web

The web engine provides a connector for Iframe & Websocket. `npm install @remixproject/engine-web`

  • 0.3.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
165
decreased by-26.34%
Maintainers
6
Weekly downloads
 
Created
Source

Engine Web

The web engine provides a connector for Iframe & Websocket. npm install @remixproject/engine-web

Iframe

The iframe connector is used to load & connect a plugin inside an iframe. Iframe based plugin are webview using an index.html as entry point & need to use @remixproject/plugin-iframe.

const myPlugin = new IframePlugin({
  name: 'my-plugin',
  url: 'https://my-plugin-path.com',
  methods: ['getData']
})
engine.register(myPlugin);
// This will create the iframe with src="https://my-plugin-path.com"
await manager.activatePlugin('my-plugin');
const data = manager.call('my-plugin', 'getData');

Communication between the plugin & the engine uses the window.postMessage() API.

Websocket

The websocket connector wraps the native Websocket object from the Web API. Websocket based plugin are usually server with a Websocket connection open. Any library can be used, remixproject provide a wrapper around the ws library : @remixproject/plugin-ws.

const myPlugin = new WebsocketOptions({
  name: 'my-plugin',
  url: 'https://my-server.com',
  methods: ['getData']
}, {
  reconnectDelay: 5000 // Time in ms to wait to reconnect after a disconnection 
});
engine.register(myPlugin);
// This will open a connection with the server. The server must be running first.
await manager.activatePlugin('my-plugin');
const data = manager.call('my-plugin', 'getData');

FAQs

Package last updated on 03 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc