Name: uvm
Owner: Postman
Description: Universal Virtual Machine for Node and Browser
Created: 2016-11-27 09:20:12.0
Updated: 2018-05-22 18:57:23.0
Pushed: 2018-05-24 11:05:18.0
Homepage: null
Size: 279
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Module that exposes an event emitter to send data across contexts (vm in node and iframe in browser)
uvm = require('uvm');
createHost({
bootTimeout: 30 * 1000, // default 30s. set `undefined` for Infinity
bootCode: `bridge.on('ping', function () {
bridge.send('pong', Date.now())
});'
unction (err, bridge) {
bridge.on('pong', console.log);
bridge.send('ping');