forked from cory/tildefriends
Send prints to the browser console. Obvious in retrospect.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3840 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -486,6 +486,8 @@ function receive(message) {
|
||||
}
|
||||
}
|
||||
console.log('error', message);
|
||||
} else if (message && message.action == "print") {
|
||||
console.log('app>', ...message.args);
|
||||
} else if (message && message.action == "stats") {
|
||||
var now = new Date().getTime();
|
||||
for (var key of Object.keys(message.stats)) {
|
||||
|
@ -200,6 +200,9 @@ async function getProcessBlob(blobId, key, options) {
|
||||
imports.app[api[0]] = process.app.makeFunction(api);
|
||||
}
|
||||
}
|
||||
process.task.onPrint = function(args) {
|
||||
process.app.send({action: 'print', args: args});
|
||||
};
|
||||
process.task.onError = function(error) {
|
||||
try {
|
||||
process.app.send({action: 'error', error: error});
|
||||
|
Reference in New Issue
Block a user