ooh this is async js

Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-05-09 17:24:10 +00:00
parent ed5d0d711b
commit a677216388
1 changed files with 3 additions and 3 deletions

View File

@ -5,13 +5,13 @@
<link rel="stylesheet" href="/steam_resource/css/library.css">
<script src="/static/library.js"></script>
<script>
function getUID() {
async function getUID() {
return call_plugin_method("whoami", {});
}
function onReady() {
async function onReady() {
let heading = document.getElementById("heading");
let id = getUID();
let id = await getUID();
heading.innerText = `Hello ${id}`;
}