wasm: support setting Emscripten configuration
Support passing Emscripten configuration options to the QtLoader constructor using the "moduleConfig" key. Previously, it was possible to set Emscripten config options on the global Module object. However, recent versions if Qt has switched to using the MODULARIZE=1 build setting, in which case there is no global object. Fixes: QTBUG-107979 Change-Id: Ie99b772ddbb1d9f5464c868a43c821bae01519e0 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit a594e95c9a2faef247a284983ef3ece277917d15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9efeed01fd
commit
665c99b6c2
@ -40,6 +40,8 @@
|
||||
//
|
||||
// Config keys
|
||||
//
|
||||
// moduleConfig : {}
|
||||
// Emscripten module configuration
|
||||
// containerElements : [container-element, ...]
|
||||
// One or more HTML elements. QtLoader will display loader elements
|
||||
// on these while loading the application, and replace the loader with a
|
||||
@ -131,7 +133,7 @@ function _QtLoader(config)
|
||||
// The Emscripten module and module configuration object. The module
|
||||
// object is created in completeLoadEmscriptenModule().
|
||||
self.module = undefined;
|
||||
self.moduleConfig = {};
|
||||
self.moduleConfig = config.moduleConfig || {};
|
||||
|
||||
// Qt properties. These are propagated to the Emscripten module after
|
||||
// it has been created.
|
||||
|
Loading…
x
Reference in New Issue
Block a user