Sha256: c88bb888849a1ec2dd230845488574403ea9a890b800f822fbf360e2a59fbb46
Contents?: true
Size: 392 Bytes
Versions: 11
Compression:
Stored size: 392 Bytes
Contents
window.Bait = # Wrap our usage of event source: # Incoming data is always an Array, the # first value indicates the scope # the second value is the callback subscribe: (handlers) -> source = new EventSource('/events') source.addEventListener "message", (e) -> data = JSON.parse(e.data) handler = handlers[data[0]][data[1]] handler.apply(@, data.slice(2))
Version data entries
11 entries across 11 versions & 1 rubygems