JavaScriptDefn#
- class penzai.treescope.foldable_representation.part_interface.JavaScriptDefn[source]#
Bases:
objectA Javascript function definition (or set of definitions).
The contents of
sourcewill be inserted into a <script> block in the rendered tree. Functions that need to be referenced by event handlers can be assigned as a property towindow.treescope, a common namespace for treescope functions.- Variables:
source (str) – The JS source code to insert.
Methods
__init__(source)Attributes
source