Assistive-Webdriver

Home > assistive-playwright-client > ScreenReaderClient > once

ScreenReaderClient.once() method

Registers a one-time listener for the message event, that will be called the next time a message is received from the screen reader.

Signature:

once(event: "message", listener: (message: string) => void): this;

Parameters

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