containerjs-api-electron
The ContainerJS Electron API
Last updated 2 years ago by devandylee .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install containerjs-api-electron 
SYNC missed versions from official npm registry.

ContainerJS API for Electron

This project provides an implementation of ContainerJS which follows the Symphony Desktop Wrapper API Specification for Electron. For more information, see The ContainerJS website

Usage

Add this package to your electron project:

npm install containerjs-api-electron --save

You need to integrate this code into both your main process and your renderer processes via a preload script.

Main process integration

This module needs to register IPC handlers once the app ready event has fired. This can be done as follows:

const ssfElectron = require('containerjs-api-electron');

function createWindow () {
  ssfElectron(url);
  // ... other stuff!
}

app.on('ready', createWindow)

where url is the URL to load in the hidden window.

Renderer process integration

The call to ssfElectron will create a browser window and will load the URL passed in the app.json file. From here, use new ssf.Window() to create windows.

Running the app

Use the ssf-electron binary to run the application. This can be installed globally by doing:

npm install --global containerjs-api-electron

To run the application, do:

ssf-electron -c ./path/to/app.json

Current Tags

  • 0.0.9                                ...           latest (2 years ago)

8 Versions

  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.6 [deprecated]           ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 8
This Month 9
Last Day 0
Last Week 1
Last Month 4
Dev Dependencies (7)

Copyright 2014 - 2016 © taobao.org |