From 62d31d996f3465b32d3e39148eeec22fe6c982ca Mon Sep 17 00:00:00 2001 From: Fabio Pliger Date: Tue, 7 May 2024 11:41:58 -0500 Subject: [PATCH] fix pydom issue with micropython, created by the monkeypatch around JsProxy --- pyscript.core/src/stdlib/pyweb/pydom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyscript.core/src/stdlib/pyweb/pydom.py b/pyscript.core/src/stdlib/pyweb/pydom.py index d68a6ce7..8c9de554 100644 --- a/pyscript.core/src/stdlib/pyweb/pydom.py +++ b/pyscript.core/src/stdlib/pyweb/pydom.py @@ -1,3 +1,5 @@ +import inspect + try: from typing import Any except ImportError: @@ -121,7 +123,7 @@ class Element(BaseElement): # TODO: this is Pyodide specific for now!!!!!! # if we get passed a JSProxy Element directly we just map it to the # higher level Python element - if isinstance(child, JsProxy): + if inspect.isclass(JsProxy) and isinstance(child, JsProxy): return self.append(Element(child)) elif isinstance(child, Element):