Sha256: 9cee1d165224b73cecbc38ffccef69ad364aa7ef161aff8f2529b578725f0517
Contents?: true
Size: 504 Bytes
Versions: 5
Compression:
Stored size: 504 Bytes
Contents
"use strict"; function send(packet) { var event = document.createEvent("CustomEvent") event.initCustomEvent("client", false, true, packet) window.dispatchEvent(event) } function server() { var Out = window.Out = [] window.addEventListener("server", function(event) { var packet = event.detail try { Out[packet.to] = window.eval(packet.source) } catch (error) { Out[packet.to] = error } send({ from: packet.to, message: Out[packet.to] }) }, false) } module.exports = server
Version data entries
5 entries across 2 versions & 1 rubygems