From e39e4829f0b5afed39f8de37f9f5b3f6d62f6728 Mon Sep 17 00:00:00 2001 From: Guido Zuidhof Date: Tue, 10 Aug 2021 02:16:02 +0100 Subject: [PATCH 1/3] Add nbtest notebook with issue --- test/dom.nb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/dom.nb diff --git a/test/dom.nb b/test/dom.nb new file mode 100644 index 0000000..df14916 --- /dev/null +++ b/test/dom.nb @@ -0,0 +1,11 @@ +# %% [python] +from js import document + +el = document.createElement("h1") +document.body.append(el); +# %% [python] +from js import document + +el = document.createElement("h1") +# el as return value of cell +el From 7e0386fde324d48be83d1b15890c133ff3eca592 Mon Sep 17 00:00:00 2001 From: Guido Zuidhof Date: Tue, 10 Aug 2021 02:33:00 +0100 Subject: [PATCH 2/3] Should pass now --- test/dom.nb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/dom.nb b/test/dom.nb index df14916..23b99a7 100644 --- a/test/dom.nb +++ b/test/dom.nb @@ -1,3 +1,8 @@ +--- +starboard: + python: + execution_mode: "pyodide_main_thread" +--- # %% [python] from js import document From a77198bf9a47ffbd7220d13d56ef5b2a08412c7f Mon Sep 17 00:00:00 2001 From: Guido Zuidhof Date: Tue, 10 Aug 2021 02:33:40 +0100 Subject: [PATCH 3/3] Switch back to explicit webworker mode in test --- test/dom.nb | 2 +- test/python.nb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/dom.nb b/test/dom.nb index 23b99a7..dfac044 100644 --- a/test/dom.nb +++ b/test/dom.nb @@ -1,7 +1,7 @@ --- starboard: python: - execution_mode: "pyodide_main_thread" + execution_mode: "pyodide_webworker" --- # %% [python] from js import document diff --git a/test/python.nb b/test/python.nb index 38f7f3d..4ae12dd 100644 --- a/test/python.nb +++ b/test/python.nb @@ -1,3 +1,8 @@ +--- +starboard: + python: + execution_mode: "pyodide_webworker" +--- # %%--- [python] # properties: # run_on_load: true