Skip to content
On this page

Interface: MatrixWidgetAPI

Matrix.MatrixWidgetAPI

MatrixWidgetAPI interface represents the Matrix widget API methods for sending and receiving messages.

Table of contents

Methods

Methods

close

close(): undefined

Closes the Matrix API message listener.

Returns

undefined

Defined in

websg.d.ts:2806


listen

listen(): undefined

Starts listening for Matrix API messages.

Returns

undefined

Defined in

websg.d.ts:2800


receive

receive(): undefined | MatrixAPIMessage

Receives a Matrix API message. Returns the received message or undefined if no message is available.

Returns

undefined | MatrixAPIMessage

  • The received Matrix API message or undefined if no message is available.

Defined in

websg.d.ts:2812


send

send(event): undefined

Sends a Matrix API message.

Parameters

NameTypeDescription
eventMatrixAPIMessageThe Matrix API message to send.

Returns

undefined

Defined in

websg.d.ts:2819