// BROWSER ENVIRONMENT 
if(!Function.prototype.bind) require('bindshim') //kindle jalopy doesn't have bind
var host = window.document.location.host.replace(/:.*/, '')
var ws = require('websocket-stream')
var wss = ws('ws://'+host)

wss.onopen = function () {
  console.log('connected')
}
wss.on('data', function (d) {
  console.log(d)
})
wss.on('close', function () {
  console.log('server close')
})

@@ -235,14 +235,16 @@
 s.on
+('
 open
- =
+',
  fun
@@ -282,16 +282,17 @@
 cted')%0A%7D
+)
 %0Awss.on(

fix open event listener