Commit 515c3a84 authored by Boxiang Sun's avatar Boxiang Sun

erp5_notebook: Use RSVP.defer instead use Promise directly

parent 5f0fdf3f
...@@ -300,16 +300,18 @@ ...@@ -300,16 +300,18 @@
} }
function pyodideSetting() { function pyodideSetting() {
return new RSVP.Promise(function (resolve, reject) {
window.pyodide = pyodide(Module); window.pyodide = pyodide(Module);
var postRunPromise = new Promise((resolve, reject) => { var defer = RSVP.defer(), promise=defer.promise;
Module.postRun = () => {
resolve();
};
});
console.log("Setting postRun"); console.log("Setting postRun");
Promise.all([ postRunPromise, ]).then(() => resolve()); window.pyodide.loadPackage = pyodideLoadPackage;
Module.postRun = defer.resolve;
promise.then(function() {
console.log("postRun get called");
}); });
console.log("Setting postRun finished");
return defer.promise;
} }
function executeCell(cell) { function executeCell(cell) {
......
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