We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ab85be commit c422444Copy full SHA for c422444
src/vm/js/nqp-runtime/runtime.js
@@ -572,6 +572,21 @@ exports.run = /*async*/ function(code, isMain) {
572
throw e;
573
}
574
575
+ } else if (once && typeof window !== 'undefined' && window.NQP_END_EVENT) {
576
+ once = false;
577
+ let ret;
578
+ try {
579
+ ret = /*await*/ doRun()
580
+ } catch (e) {
581
+ if (e instanceof browser.Exit) {
582
+ console.info('exit', e.status);
583
+ } else {
584
+ throw e;
585
+ }
586
587
+
588
+ console.info('end');
589
+ return ret;
590
} else {
591
return /*await*/ doRun();
592
0 commit comments