mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
* bootstrap *pyscript* module ASAP as stdlib * improve the test to be sure `js.document` exists **before** our module is imported
This commit is contained in:
committed by
GitHub
parent
40e99abbdf
commit
96e671b55f
@@ -33,9 +33,13 @@ const write = (base, literal) => {
|
||||
|
||||
write(".", pyscript);
|
||||
|
||||
python.push("del _Path");
|
||||
python.push("del _path");
|
||||
python.push("del _os");
|
||||
// in order to fix js.document in the Worker case
|
||||
// we need to bootstrap pyscript module ASAP
|
||||
python.push("import pyscript as _pyscript");
|
||||
|
||||
python.push(
|
||||
...["_Path", "_path", "_os", "_pyscript"].map((ref) => `del ${ref}`),
|
||||
);
|
||||
python.push("\n");
|
||||
|
||||
export default python.join("\n");
|
||||
|
||||
Reference in New Issue
Block a user