From 3e0c891184879b65e1d45f9971bbd53f2deee04a Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 7 Feb 2019 21:38:39 -0500 Subject: [PATCH] Update for new Iodide renderer API --- src/pyodide.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pyodide.js b/src/pyodide.js index 1007929dc..4725b224a 100644 --- a/src/pyodide.js +++ b/src/pyodide.js @@ -370,8 +370,13 @@ var languagePluginLoader = new Promise((resolve, reject) => { document.getElementsByTagName('head')[0].appendChild(link); // Add a custom output handler for Python objects +<<<<<<< HEAD self.iodide.addOutputHandler({ shouldHandle : (val) => { +======= + window.iodide.addOutputRenderer({ + shouldRender : (val) => { +>>>>>>> Update for new Iodide renderer API return (typeof val === 'function' && pyodide._module.PyProxy.isPyProxy(val)); }, @@ -396,7 +401,7 @@ var languagePluginLoader = new Promise((resolve, reject) => { div.appendChild(pre); element = div; } - return element; + return element.outerHTML; } }); }