summaryrefslogtreecommitdiffstats
path: root/platform/javascript/engine/engine.js
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-10-15 10:28:59 +0200
committerGitHub <noreply@github.com>2020-10-15 10:28:59 +0200
commitcb3d5b6ddaf231664b480997b9e640cc0b695c45 (patch)
treee2f85338c45019cdc924c6ed7f9a355c1d02c7c1 /platform/javascript/engine/engine.js
parent075a8baa363e1048b31647298d7116b720511096 (diff)
parentc54de7f5899f2bd64caee65efe16975a179aa51f (diff)
downloadredot-engine-cb3d5b6ddaf231664b480997b9e640cc0b695c45.tar.gz
Merge pull request #42789 from Faless/js/4.0_html_editor_first_iteration
[HTML5] Editor prototype
Diffstat (limited to 'platform/javascript/engine/engine.js')
-rw-r--r--platform/javascript/engine/engine.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/javascript/engine/engine.js b/platform/javascript/engine/engine.js
index adcd919a6b..05a11701c0 100644
--- a/platform/javascript/engine/engine.js
+++ b/platform/javascript/engine/engine.js
@@ -121,6 +121,7 @@ Function('return this')()['Engine'] = (function() {
me.rtenv['noExitRuntime'] = true;
me.rtenv['onExecute'] = me.onExecute;
me.rtenv['onExit'] = function(code) {
+ me.rtenv['deinitFS']();
if (me.onExit)
me.onExit(code);
me.rtenv = null;
@@ -227,6 +228,12 @@ Function('return this')()['Engine'] = (function() {
this.persistentPaths = persistentPaths;
};
+ Engine.prototype.requestQuit = function() {
+ if (this.rtenv) {
+ this.rtenv['request_quit']();
+ }
+ };
+
// Closure compiler exported engine methods.
/** @export */
Engine['isWebGLAvailable'] = Utils.isWebGLAvailable;
@@ -249,5 +256,6 @@ Function('return this')()['Engine'] = (function() {
Engine.prototype['setOnExit'] = Engine.prototype.setOnExit;
Engine.prototype['copyToFS'] = Engine.prototype.copyToFS;
Engine.prototype['setPersistentPaths'] = Engine.prototype.setPersistentPaths;
+ Engine.prototype['requestQuit'] = Engine.prototype.requestQuit;
return Engine;
})();