mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
39 lines
1.4 KiB
HTML
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>
|