mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-18 04:01:10 -05:00
Defaulting to async for top-level await (#2134)
This commit is contained in:
committed by
GitHub
parent
fafdf74007
commit
0d0ea96435
@@ -5,11 +5,17 @@
|
||||
<script type="module" src="../dist/core.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<py-script async>
|
||||
<py-script>
|
||||
import asyncio
|
||||
print('foo')
|
||||
print('py-script sleep')
|
||||
await asyncio.sleep(1)
|
||||
print('bar')
|
||||
print('py-script done')
|
||||
</py-script>
|
||||
<script type="py">
|
||||
import asyncio
|
||||
print('script-py sleep')
|
||||
await asyncio.sleep(1)
|
||||
print('script-py done')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user