mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-24 11:03:39 -05:00
Allow Workers w/out SharedArrayBuffer (#1967)
Allow Workers w/out SharedArrayBuffer
This commit is contained in:
committed by
GitHub
parent
bcaab0eb93
commit
181d276c8b
23
pyscript.core/test/no_sab/index.html
Normal file
23
pyscript.core/test/no_sab/index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="../../dist/core.css">
|
||||
<script type="module">
|
||||
import { PyWorker } from '../../dist/core.js';
|
||||
const { sync } = await PyWorker(
|
||||
'./worker.py',
|
||||
{
|
||||
config: {
|
||||
sync_main_only: true
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
document.documentElement.classList.add(
|
||||
await sync.get_class()
|
||||
);
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
||||
3
pyscript.core/test/no_sab/worker.py
Normal file
3
pyscript.core/test/no_sab/worker.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from pyscript import sync
|
||||
|
||||
sync.get_class = lambda: "ok"
|
||||
0
pyscript.core/test/test.html
Normal file
0
pyscript.core/test/test.html
Normal file
Reference in New Issue
Block a user