-
-
Save vdeturckheim/1b2ab6d813657b3e6d1b21b647285e79 to your computer and use it in GitHub Desktop.
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
await client.Runtime.evaluate({ | |
expression:"process.patchListeners = require(`./toInject.js`).patchListeners", | |
includeCommandLineAPI: true, | |
returnByValue: false | |
}); | |
// in the injected function, the value for `this` will be the instance of the server | |
await client.Runtime.callFunctionOn({ | |
objectId: serverInstance, | |
functionDeclaration: 'function() { process.patchListeners(this) }', | |
returnByValue: true | |
}); | |
await client.Runtime.evaluate({ | |
expression:"delete process.patchListeners", | |
includeCommandLineAPI: true, | |
returnByValue: false | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment