summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/wasm_shell.html
diff options
context:
space:
mode:
authorDavid Skoland <david.skoland@qt.io>2022-06-01 15:11:43 +0200
committerDavid Skoland <david.skoland@qt.io>2022-06-03 05:30:46 +0200
commitfd4f218c1eb4cdbc96c1ef2086e3390fe26fa63f (patch)
tree345d2aee0306f542b4d571c7362510ab23b2e59a /src/plugins/platforms/wasm/wasm_shell.html
parent2c66a8a850ca1a25e6b00f6c42d423328621ede7 (diff)
Expose the qtloader object globally
When testing, we need to query the state of the Qt application, so change the scope of qtloader from inside the init function to global scope. Additionally, adjust the test script accordingly to query and use this state to make good decisions on how to terminate. Change-Id: I6264ba20843716eb87340b160680617b718f6bd9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/wasm_shell.html')
-rw-r--r--src/plugins/platforms/wasm/wasm_shell.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/wasm_shell.html b/src/plugins/platforms/wasm/wasm_shell.html
index 9ec18abe5b..ecbce6c043 100644
--- a/src/plugins/platforms/wasm/wasm_shell.html
+++ b/src/plugins/platforms/wasm/wasm_shell.html
@@ -29,12 +29,13 @@
<canvas id="qtcanvas"></canvas>
<script type='text/javascript'>
+ let qtLoader = undefined;
function init() {
var spinner = document.querySelector('#qtspinner');
var canvas = document.querySelector('#qtcanvas');
var status = document.querySelector('#qtstatus')
- var qtLoader = QtLoader({
+ qtLoader = QtLoader({
canvasElements : [canvas],
showLoader: function(loaderStatus) {
spinner.style.display = 'block';