Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
29 lines
488 B
JavaScript
Executable file
29 lines
488 B
JavaScript
Executable file
/* exported console */
|
|
'use strict';
|
|
|
|
(function Console(exports) {
|
|
|
|
function getString(a) {
|
|
var out = '';
|
|
for (var c = 0; c < a.length; c++) {
|
|
out += a[c];
|
|
}
|
|
|
|
return out;
|
|
}
|
|
|
|
exports.console = {
|
|
'error': function() {
|
|
self.postMessage({
|
|
type: 'error',
|
|
data: getString(arguments)
|
|
});
|
|
},
|
|
'log': function() {
|
|
self.postMessage({
|
|
type: 'trace',
|
|
data: getString(arguments)
|
|
});
|
|
}
|
|
};
|
|
})(self);
|