summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-09-21 13:55:30 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-10-14 11:15:24 +0200
commit6769dd64fc5430e8c34295cb41434bff734a5155 (patch)
tree74e7f08b19cdd7898ce381c43e0bcd36d4ff62de /platform
parentc3b7c5cc2d3f5d6ee42ba71d3880d3a3a8d5a0cb (diff)
[HTML5] Expose request_quit via Engine class.
So it can be called when closure compiler is enabled.
Diffstat (limited to 'platform')
-rw-r--r--platform/javascript/engine/engine.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/javascript/engine/engine.js b/platform/javascript/engine/engine.js
index adcd919a6b..f8e216db2d 100644
--- a/platform/javascript/engine/engine.js
+++ b/platform/javascript/engine/engine.js
@@ -227,6 +227,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 +255,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;
})();