EmbeddedIFrame#
- class penzai.treescope.foldable_representation.embedded_iframe.EmbeddedIFrame[source]#
Bases:
RenderableTreePart
Builds an HTML iframe containing scoped HTML for a rich display object.
- Variables:
embedded_html (str) – HTML source to render in the iframe.
fallback_in_text_mode (RenderableTreePart) – Fallback object to render in text mode.
virtual_width (int) – Number of characters wide to pretend this iframe is for layout purposes (since we can’t infer it from
embedded_html
until it’s actually rendered)virtual_height (int) – Number of lines high to pretend this iframe is for layout purposes (since we can’t infer it from
embedded_html
until it’s actually rendered)
Inherited Attributes
collapsed_width
The length of this rendering if collapsed in one line, in characters.
newlines_in_expanded_parent
The number of newlines in this rendering if in an expanded parent.
tags_in_this_part
Returns a set of "tag" objects contained in this part.
Methods
__init__
(embedded_html, fallback_in_text_mode)foldables_in_this_part
()html_setup_parts
(context)render_to_html
(stream, *[, at_beginning_of_line])render_to_text
(stream, *, expanded_parent, ...)Attributes
collapsed_width
The length of this rendering if collapsed in one line, in characters.
newlines_in_expanded_parent
The number of newlines in this rendering if in an expanded parent.
tags_in_this_part
Returns a set of "tag" objects contained in this part.
virtual_height
virtual_width
embedded_html
fallback_in_text_mode