JavaScriptDefn#
- class penzai.treescope.foldable_representation.part_interface.JavaScriptDefn[source]#
Bases:
object
A Javascript function definition (or set of definitions).
The contents of
source
will 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