diff options
Diffstat (limited to 'src/plugins/platforms/wasm/qtloader.js')
-rw-r--r-- | src/plugins/platforms/wasm/qtloader.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qtloader.js b/src/plugins/platforms/wasm/qtloader.js index 2de0ac95e8c..33f27bd9b26 100644 --- a/src/plugins/platforms/wasm/qtloader.js +++ b/src/plugins/platforms/wasm/qtloader.js @@ -109,8 +109,25 @@ // Loading to Running occurs. +// Forces the use of constructor on QtLoader instance. +// This passthrough makes both the old-style: +// +// const loader = QtLoader(config); +// +// and the new-style: +// +// const loader = new QtLoader(config); +// +// styles work. function QtLoader(config) { + return new _QtLoader(config); +} + +function _QtLoader(config) +{ + const self = this; + // The Emscripten module and module configuration object. The module // object is created in completeLoadEmscriptenModule(). self.module = undefined; |