INNER CODE UNIT · Python
__init__
volfpeter/htmy · htmy/core.py:45
def __init__(self, *children: ComponentType, context: Context) -> None:
"""
Initialization.
Arguments:
*children: The children components to wrap in the given context.
context: The context to make available to children components.
"""
super().__init__(*children)
self._context = context
def htmy_context(self) -> Context:
"""Returns the context for child rendering."""
return self._context
# -- Context utilities