BroadcastChannel
Overview
BroadcastChannel is a class in Aspose.Html FOSS for Python.
Inherits from: EventTarget.
Deterministic same-runtime BroadcastChannel fan-out delivery.
This class provides 6 methods for working with BroadcastChannel objects in Python programs.
Available methods include: __init__, add_event_listener, close, dispatch_event, post_message, remove_event_listener.
All public members are accessible to any Python application after installing the Aspose.Html FOSS for Python package.
Properties: name, onmessage.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
name | str | Read | Channel name provided at construction time. |
onmessage | Callable[[object], object] | None | Read | Gets the onmessage. |
Methods
| Signature | Description |
|---|---|
__init__(name: str) | Calls init(name) on this BroadcastChannel instance. |
post_message(message: object) | Queue same-name sibling fan-out delivery via event-loop scheduling. |
close() | Close the channel; repeated calls are ignored. |
add_event_listener(type: str, listener: Callable, capture: bool, once: bool) | Register listener for events of type. |
remove_event_listener(type: str, listener: Callable, capture: bool) | Deregister a previously-registered listener. |
dispatch_event(event: "Event") → bool | Dispatch event through the ancestor tree. |