mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Use <script type="py"> instead of <py-script> in most tests (#1723)
This is mostly a global search&replace, to replace <py-script> with <script type="py">. The vast majority of tests just works, some needed some tweak.
This commit is contained in:
@@ -150,5 +150,12 @@ def display(*values, target=None, append=True):
|
||||
target = current_target()
|
||||
|
||||
element = document.getElementById(target)
|
||||
|
||||
# if element is a <script type="py">, it has a 'target' attribute which
|
||||
# points to the visual element holding the displayed values. In that case,
|
||||
# use that.
|
||||
if element.tagName == 'SCRIPT' and hasattr(element, 'target'):
|
||||
element = element.target
|
||||
|
||||
for v in values:
|
||||
_write(element, v, append=append)
|
||||
|
||||
Reference in New Issue
Block a user