tab-stream

net style streams between browser tabs

npm install tab-stream
39 downloads in the last month

tab-stream

Create net style servers, connections between browser-tabs.

Using an ... ugly hack, messsages are sent between browser tabs/windows from the same domain.

Just pretend it's a net server unix socket...

Example


var tab = require('tab-stream')

tab.createServer(function (stream) {
  //SERVER
}).listen('socket')

//CLIENT
tab.connect('socket')

Instead of a numerical port, just pass a string. The idea is to make this as close to net as possible.

Also, see autonode

License

MIT

npm loves you