Migrate to using the constructor of QtLoader
Wasm shell used to call the function QtLoader instead of constructing a new QtLoader. Change this. Also change the doc to recommend using the constructor. Change-Id: I57c52eab389aa82449c7db3f4c646ffb234df778 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
0786405857
commit
626ec74359
@ -18,10 +18,10 @@
|
||||
// var config = {
|
||||
// containerElements : [$("container-id")];
|
||||
// }
|
||||
// var qtLoader = QtLoader(config);
|
||||
// var qtLoader = new QtLoader(config);
|
||||
// qtLoader.loadEmscriptenModule("applicationName");
|
||||
//
|
||||
// External mode.usage:
|
||||
// External mode usage:
|
||||
//
|
||||
// var config = {
|
||||
// canvasElements : [$("canvas-id")],
|
||||
@ -35,7 +35,7 @@
|
||||
// return canvas;
|
||||
// }
|
||||
// }
|
||||
// var qtLoader = QtLoader(config);
|
||||
// var qtLoader = new QtLoader(config);
|
||||
// qtLoader.loadEmscriptenModule("applicationName");
|
||||
//
|
||||
// Config keys
|
||||
@ -118,7 +118,7 @@
|
||||
//
|
||||
// const loader = new QtLoader(config);
|
||||
//
|
||||
// styles work.
|
||||
// instantiation types work.
|
||||
function QtLoader(config)
|
||||
{
|
||||
return new _QtLoader(config);
|
||||
|
@ -35,7 +35,7 @@
|
||||
var canvas = document.querySelector('#qtcanvas');
|
||||
var status = document.querySelector('#qtstatus')
|
||||
|
||||
qtLoader = QtLoader({
|
||||
qtLoader = new QtLoader({
|
||||
canvasElements : [canvas],
|
||||
showLoader: function(loaderStatus) {
|
||||
spinner.style.display = 'block';
|
||||
|
Loading…
Reference in New Issue
Block a user