ooh this is async js
Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
parent
ed5d0d711b
commit
a677216388
|
@ -5,13 +5,13 @@
|
||||||
<link rel="stylesheet" href="/steam_resource/css/library.css">
|
<link rel="stylesheet" href="/steam_resource/css/library.css">
|
||||||
<script src="/static/library.js"></script>
|
<script src="/static/library.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function getUID() {
|
async function getUID() {
|
||||||
return call_plugin_method("whoami", {});
|
return call_plugin_method("whoami", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onReady() {
|
async function onReady() {
|
||||||
let heading = document.getElementById("heading");
|
let heading = document.getElementById("heading");
|
||||||
let id = getUID();
|
let id = await getUID();
|
||||||
|
|
||||||
heading.innerText = `Hello ${id}`;
|
heading.innerText = `Hello ${id}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue