Files
pyscript/pyscript.core/test/wasmoon.html
Andrea Giammarchi c6b5ce7f55 [next] Drop web like events (#1578)
* Use registerJSModule when available (#1573)

* Updated version to publish latest
2023-07-06 17:56:06 +02:00

39 lines
1.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>lua</title>
<link rel="stylesheet" href="style.css" />
<script type="importmap">
{
"imports": {
"basic-devtools": "../node_modules/basic-devtools/esm/index.js",
"coincident/window": "../node_modules/coincident/window.js",
"@ungap/with-resolvers": "../node_modules/@ungap/with-resolvers/index.js",
"@ungap/structured-clone/json": "../node_modules/@ungap/structured-clone/esm/json.js"
}
}
</script>
<script type="module" src="../esm/index.js"></script>
</head>
<body>
<script type="wasmoon" config="./fetch.toml">
local function read_file(path)
local file = io.open(path, "rb")
if not file then return nil end
local content = file:read "*a"
file:close()
return content
end
function print_version(event)
print(event.type)
print(_VERSION)
print(read_file('/a.py'))
end
</script>
<button wasmoon-click="print_version">wasmoon version</button>
</body>
</html>