Commit 23e13f5c authored by Boxiang Sun's avatar Boxiang Sun

erp5_notebook: Remove custom_pyodide.js

parent 2ddf2d6a
var initPyodide = new Promise((resolve, reject) => {
// Loading Pyodide
let wasmURL = `pyodide.asm.wasm`;
let Module = {};
window.Module = Module;
let wasm_promise = WebAssembly.compileStreaming(fetch(wasmURL));
Module.instantiateWasm = (info, receiveInstance) => {
wasm_promise.then(module => WebAssembly.instantiate(module, info))
.then(instance => receiveInstance(instance));
return {};
};
var postRunPromise = new Promise((resolve, reject) => {
Module.postRun = () => {
resolve();
};
});
Promise.all([ postRunPromise, ]).then(() => resolve());
let data_script = document.createElement('script');
data_script.src = `pyodide.asm.data.js`;
data_script.onload = (event) => {
let script = document.createElement('script');
script.src = `pyodide.asm.js`;
script.onload = () => {
window.pyodide = pyodide(Module);
};
document.head.appendChild(script);
};
document.head.appendChild(data_script);
});
initPyodide
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>custom_pyodide.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment