Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Last active March 9, 2020 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/77f23ee86ac235321ad137ec3710de65 to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/77f23ee86ac235321ad137ec3710de65 to your computer and use it in GitHub Desktop.
ses-test
class Client {
on(message) {
this.call(message)
}
// hooked by "connectClient"
call(message) {}
}
function connectClient(client) {
host.on((msg) => client.on(msg))
client['call'] = (msg) => host.send(`Modified by realm: ${msg}`)
}
connectClient(new Client())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment