display_streaming_as_root#
- treescope.lowering.display_streaming_as_root(root_node: rendering_parts.RenderableTreePart, deferreds: Sequence[foldable_impl.DeferredWithThunk], roundtrip: bool = False, compressed: bool = True, stealable: bool = False, ignore_exceptions: bool = False) str | None [source]#
Displays a root node in an IPython notebook in a streaming fashion.
- Parameters:
root_node – The root node to render.
deferreds – Deferred objects to render and splice in.
roundtrip – Whether to render in roundtrip mode.
compressed – Whether to compress the HTML for display.
stealable – Whether to return an extra HTML snippet that allows the streaming rendering to be relocated after it is shown.
ignore_exceptions – Whether to ignore exceptions during deferred rendering, replacing them with error markers.
- Returns:
If
stealable
is True, a final HTML snippet which, if inserted into a document, will “steal” the root node rendering, moving the DOM nodes for it into itself. In particular, using this as the HTML rendering of the root node during pretty printing will correctly associate the rendering with the IPython “cell output”, which is visible in some IPython backends (e.g. JupyterLab). Ifstealable
is False, returns None.