mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
* Fix #2114 - Cleanup the test folder + automation * Merged both test and tests into a single folder
37 lines
872 B
HTML
37 lines
872 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="../../dist/core.css">
|
|
<script type="module" src="../../dist/core.js"></script>
|
|
<script type="module">
|
|
customElements.whenDefined('py-script').then(PyScript => {
|
|
const textContent = `
|
|
from pyscript import display
|
|
|
|
display("Hello World")
|
|
`;
|
|
|
|
document.body.append(
|
|
// test <script type="py">
|
|
Object.assign(
|
|
document.createElement('script'),
|
|
{ type: "py", textContent }
|
|
),
|
|
|
|
// test <py-script>
|
|
Object.assign(
|
|
document.createElement('py-script'),
|
|
{ textContent }
|
|
),
|
|
|
|
// test PyScript class
|
|
Object.assign(
|
|
new PyScript(),
|
|
{ textContent }
|
|
)
|
|
);
|
|
});
|
|
</script>
|
|
</head>
|
|
</html>
|