Home > assistive-playwright-client > ScreenReaderClient > on
Registers a listener for the message
event, that will be called each time a message is received from the screen reader.
Signature:
on(event: "message", listener: (message: string) => void): this;
Parameter | Type | Description |
---|---|---|
event | “message” | “message” |
listener | (message: string) => void | function to be called with the received messageThe listener can removed with ScreenReaderClient.off(). |
Returns:
this