You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing with Sandbox on node 0.10.33 on OSX. I can send message from inside the Sandbox out the host environment. When I try and postMessage() into the Sandbox and with an onmessage function defined, the run() method times out.
Here's my code
var Sandbox = require('sandbox');
sb = new Sandbox();
sb.on('message', function (message) {
console.log("outer message handler: "+message);
});
sb.on('ready', function() {
console.log('ready. posting...');
sb.postMessage("calling when ready");
});
sb.run("postMessage('message from inside'); 10 + 10;", function(output) {
console.log(output)
});
sb = new Sandbox();
sb.on('message', function (message) {
console.log("outer message handler: "+message);
});
sb.on('ready', function() {
console.log('ready. posting...');
sb.postMessage("calling when ready");
});
sb.run("onmessage = function (msg) { console.log(msg); };", function(output) {
console.log(output)
});
Is anyone else seeing this problem? I've run the test code and it passes on my machine. If I modify the test code by removing the spies, then the same timeout problem occurs.
A little help appreciated,
Ijonas.
The text was updated successfully, but these errors were encountered:
Hi,
I've been playing with Sandbox on node 0.10.33 on OSX. I can send message from inside the Sandbox out the host environment. When I try and postMessage() into the Sandbox and with an onmessage function defined, the run() method times out.
Here's my code
Producing the following output:
Is anyone else seeing this problem? I've run the test code and it passes on my machine. If I modify the test code by removing the spies, then the same timeout problem occurs.
A little help appreciated,
Ijonas.
The text was updated successfully, but these errors were encountered: