Change events, block references, and SSE swap element extraction.
pages.reactive.events
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Identity of a reactive subscriber connection.
Attached at subscribe time so the bus can filter events per-user, track presence, and invoke disconnect callbacks.
Emitted by a store after a data mutation.
Reference to a renderable block within a template.
Parsed info about an HTML element withsse-swap.
Extract elements withsse-swapand find their associated blocks.
For each<tag ... sse-swap="event" ...>found, captures the swap
event name, elementid,…
ConnectionInfo
class
Identity of a reactive subscriber connection.
Attached at subscribe time so the bus can filter events per-user, track presence, and invoke disconnect callbacks.
ChangeEvent
class
Emitted by a store after a data mutation.
BlockRef
class
Reference to a renderable block within a template.
_SSESwapElement
class
Parsed info about an HTML element withsse-swap.
_extract_sse_swap_elements
function
def _extract_sse_swap_elements(source: str) -> list[_SSESwapElement]
Extract elements withsse-swapand find their associated blocks.
For each<tag ... sse-swap="event" ...>found, captures the swap
event name, elementid, and the associated {% block NAME %}.
Handles two common patterns:
-
Block inside element (block is a child)::
<span id="status" sse-swap="status"> {% block toolbar_status %}v{{ doc.version }}{% endblock %} </span> -
Block wraps element (block is the parent)::
{% block toolbar_status %} <span id="status" sse-swap="status">v{{ doc.version }}</span> {% endblock %}
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
source
|
str
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/pages/reactive/events.py:1