forked from cory/tildefriends
Cory McWilliams
352f33f5a1
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3859 ed5197a5-7fde-0310-b194-c3ffbd925b24
23 lines
563 B
PHP
Executable File
23 lines
563 B
PHP
Executable File
try {
|
|
this['Module'] = Module;
|
|
Module.test;
|
|
} catch(e) {
|
|
this['Module'] = Module = {};
|
|
}
|
|
if (typeof process === 'object') {
|
|
if (typeof(FS) === 'object') {
|
|
Module['preRun'] = Module['preRun'] || [];
|
|
Module['preRun'].push(function() {
|
|
FS.init();
|
|
FS.mkdir('/test-data');
|
|
FS.mount(NODEFS, { root: '.' }, '/test-data');
|
|
});
|
|
}
|
|
} else {
|
|
Module['print'] = function(x) {
|
|
var event = new Event('test-output');
|
|
event.data = x;
|
|
window.dispatchEvent(event);
|
|
};
|
|
}
|