load doc samples on page load
This commit is contained in:
parent
1fec74c8bf
commit
503ddaeae1
|
@ -278,7 +278,7 @@ ALIASES = "accessors=\par Access functions:^^" \
|
||||||
"states=\par States:^^" \
|
"states=\par States:^^" \
|
||||||
"skinlet=\par Default Skinlet:^^" \
|
"skinlet=\par Default Skinlet:^^" \
|
||||||
"aspect=\par Aspect^^" \
|
"aspect=\par Aspect^^" \
|
||||||
"embedWasm=<div> <div id=\"qtspinner\"> <div id=\"qtstatus\"></div> </div> <div id=\"qt-wasm-screen\"> </div> </div> <a href=\"javascript:docSampleInit()\">Run the code!</a>"
|
"embedWasm=<div> <div id=\"qtspinner\"> <div id=\"qtstatus\"></div> </div> <div id=\"qt-wasm-screen\"> </div> </div>"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,33 +36,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
showUi(spinner);
|
if(spinner)
|
||||||
status.innerHTML = 'Loading...';
|
{
|
||||||
|
showUi(spinner);
|
||||||
|
status.innerHTML = 'Loading...';
|
||||||
|
|
||||||
const instance = await qtLoad({
|
const instance = await qtLoad({
|
||||||
qt: {
|
qt: {
|
||||||
onLoaded: () => showUi(screen),
|
onLoaded: () => showUi(screen),
|
||||||
onExit: exitData =>
|
onExit: exitData =>
|
||||||
{
|
{
|
||||||
status.innerHTML = 'Application exit';
|
status.innerHTML = 'Application exit';
|
||||||
status.innerHTML +=
|
status.innerHTML +=
|
||||||
exitData.code !== undefined ? ` with code ` : '';
|
exitData.code !== undefined ? ` with code ` : '';
|
||||||
status.innerHTML +=
|
status.innerHTML +=
|
||||||
exitData.text !== undefined ? ` ()` : '';
|
exitData.text !== undefined ? ` ()` : '';
|
||||||
showUi(spinner);
|
showUi(spinner);
|
||||||
},
|
},
|
||||||
entryFunction: window.createQtAppInstance,
|
entryFunction: window.createQtAppInstance,
|
||||||
containerElements: [screen],
|
containerElements: [screen],
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
console.error(e.stack);
|
console.error(e.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="apiDocumentationSamples.js"></script>
|
<script type="text/javascript" src="apiDocumentationSamples.js"></script>
|
||||||
<script type="text/javascript" src="qtloader.js"></script>
|
<script type="text/javascript" src="qtloader.js"></script>
|
||||||
<!-- end QSkinny WASM code -->
|
<!-- end QSkinny WASM code -->
|
||||||
$treeview
|
$treeview
|
||||||
|
@ -72,7 +75,7 @@ $darkmode
|
||||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||||
$extrastylesheet
|
$extrastylesheet
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onLoad="docSampleInit()">
|
||||||
<!--BEGIN DISABLE_INDEX-->
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
<!--BEGIN FULL_SIDEBAR-->
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
|
Loading…
Reference in New Issue