Alerter¶
Overview¶
Generic base class responsible for interfacing between a Node to alert description. @author Michael Kauzmann (PhET Interactive Simulations)
Class Alerter¶
Constructor¶
new Alerter( providedOptions? : AlerterOptions )¶
Instance Methods¶
alert( alertable : TAlertable )¶
Alert to both description and voicing utteranceQueues, depending on if both are supported by this instance
alertDescriptionUtterance( alertable : TAlertable )¶
Forward to provided Node for UtteranceQueue alerting logic. See ParallelDOM.alertDescriptionUtterance() for details.
forEachUtteranceQueue( utteranceQueueCallback : UtteranceQueueCallback )¶
Forward to provided Node for UtteranceQueue alerting logic. See ParallelDOM.forEachUtteranceQueue() for details.
Instance Properties¶
alertToVoicing : boolean¶
(readonly)
descriptionAlertNode : Node | null¶
(readonly)
Type AlerterOptions¶
- alertToVoicing?: boolean
When true, alerts will be sent to the voicingUtteranceQueue. This shutoff valve is similar to descriptionAlertNode, but for voicing. - descriptionAlertNode?: Node | null
If provided, use this Node to send description alerts to one or more Display's UtteranceQueue. Unlike for Voicing, description alerts must occur through a Node connected to a Display through the scene graph. If null, do not alert for description (same as alertToVoicing:false). NOTE: No description will alert without this option! - & EnabledComponentOptions
Source Code¶
See the source for Alerter.ts in the scenery-phet repository.