pre.js.inc 498 B

1234567891011121314151617181920
  1. try {
  2. this['Module'] = Module;
  3. Module.test;
  4. } catch(e) {
  5. this['Module'] = Module = {};
  6. }
  7. if (typeof process === 'object') {
  8. Module['preRun'] = Module['preRun'] || [];
  9. Module['preRun'].push(function() {
  10. FS.init();
  11. FS.mkdir('/test-data');
  12. FS.mount(NODEFS, { root: '.' }, '/test-data');
  13. });
  14. } else {
  15. Module['print'] = function(x) {
  16. var event = new Event('test-output');
  17. event.data = x;
  18. window.dispatchEvent(event);
  19. };
  20. }