Last active
March 9, 2020 16:05
-
-
Save GrandSchtroumpf/77f23ee86ac235321ad137ec3710de65 to your computer and use it in GitHub Desktop.
ses-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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