ContextLossFailureDialog¶
Overview¶
Failure message displayed when a WebGL context loss is experienced and we can't recover. Offers a button to reload the simulation.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class ContextLossFailureDialog¶
Constructor¶
new ContextLossFailureDialog( providedOptions? : ContextLossFailureDialogOptions )¶
Instance Methods¶
dispose()¶
hide()¶
Invokes the reload callback when the dialog is hidden. See https://github.com/phetsims/scenery-phet/issues/373.
hideWithoutReload()¶
Hides the dialog without invoking the reload callback.
Type ContextLossFailureDialogOptions¶
- reload?: () => void
By default, pressing the Reload button reloads the simulation in the browser. Provided as an option so that scenery-phet demo app can test without causing automated-testing failures. See https://github.com/phetsims/scenery-phet/issues/375 - & DialogOptions
Source Code¶
See the source for ContextLossFailureDialog.ts in the scenery-phet repository.