summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/wasm_shell.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/wasm_shell.html')
-rw-r--r--src/plugins/platforms/wasm/wasm_shell.html20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/plugins/platforms/wasm/wasm_shell.html b/src/plugins/platforms/wasm/wasm_shell.html
index 67bfcdfbdc..39bb711b6b 100644
--- a/src/plugins/platforms/wasm/wasm_shell.html
+++ b/src/plugins/platforms/wasm/wasm_shell.html
@@ -7,27 +7,32 @@
<style>
html, body { padding: 0; margin : 0; overflow:hidden; height: 100% }
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
- canvas { border: 0px none; background-color: white; height:100%; width:100%; }
+ canvas { border: 0px none; background-color: white; height:100%; width:100%; }
+ /* The contenteditable property is set to true for the canvas in order to support
+ clipboard events. Hide the resulting focus frame and set the cursor back to
+ the default cursor. */
+ canvas { outline: 0px solid transparent; cursor:default }
</style>
</head>
<body onload="init()">
- <figure style="overflow:visible;" id="spinner">
+ <figure style="overflow:visible;" id="qtspinner">
<center style="margin-top:1.5em; line-height:150%">
<img src="qtlogo.svg"; width=320; height=200; style="display:block"> </img>
<strong>Qt for WebAssembly: APPNAME</strong>
- <div id="status"></div>
+ <div id="qtstatus"></div>
<noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript>
</center>
</figure>
- <canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
+ <canvas id="qtcanvas" oncontextmenu="event.preventDefault()" contenteditable="true"></canvas>
<script type='text/javascript'>
function init() {
- var spinner = document.getElementById('spinner');
- var canvas = document.getElementById('canvas');
- var status = document.getElementById('status')
+ var spinner = document.getElementById('qtspinner');
+ var canvas = document.getElementById('qtcanvas');
+ var status = document.getElementById('qtstatus')
var qtLoader = QtLoader({
+ canvasElements : [canvas],
showLoader: function(loaderStatus) {
spinner.style.display = 'block';
canvas.style.display = 'none';
@@ -50,7 +55,6 @@
showCanvas: function() {
spinner.style.display = 'none';
canvas.style.display = 'block';
- return canvas;
},
});
qtLoader.loadEmscriptenModule("APPNAME");