Skip to content

Commit 8127687

Browse files
committed
Expand on the WidgetMessaging doc comment
1 parent 80a6ddc commit 8127687

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/stores/widgets/WidgetMessaging.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,17 @@ interface WidgetMessagingOptions {
167167
}
168168

169169
/**
170-
* A running instance of a widget, associated with an iframe and a messaging transport.
171-
* Instances must be tracked by WidgetMessagingStore, as only one WidgetMessaging instance
172-
* should exist for a given widget.
170+
* A running instance of a widget, associated with an iframe and an active communication
171+
* channel. Instances must be tracked by WidgetMessagingStore, as only one WidgetMessaging
172+
* instance should exist for a given widget.
173+
*
174+
* This class is responsible for:
175+
* - Computing the templated widget URL
176+
* - Starting a {@link ClientWidgetApi} communication channel with the widget
177+
* - Eagerly pushing events from the Matrix client to the widget
178+
*
179+
* @see {@link ElementWidgetDriver} for the class used to *pull* data lazily from the
180+
* Matrix client to the widget on the widget's behalf.
173181
* @see {@link WidgetMessagingStore} for the store that holds these instances.
174182
*/
175183
export class WidgetMessaging extends TypedEventEmitter<WidgetMessagingEvent, WidgetMessagingEventMap> {

0 commit comments

Comments
 (0)