Class: TimeLimitedBusyIndicator

hcje/domTools.TimeLimitedBusyIndicator(options)

Busy indicator that displays an indicator in the DOM. It includes a timeout that defaults to 15 seconds

Constructor

new TimeLimitedBusyIndicator(options)

Create a busy indicator. The indicator is automatically added to the DOM. If the timeoutSeconds are > 0, then the end method must be called, otherwise the indicator will time out and the user will be offered the chance to navigate back in history or reload.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
label string <optional>
'Busy'

Label added as an aria-label.

timeoutS number <optional>
15

Timeout in seconds.

timeoutMessage string <optional>
default message

Message to display on timeout. This should include a prompt that that if OK is selected the page will wait, and if cancel is selected the page will reload. The default message, which has no localisation, is "The last action is taking too long. Do you want to wait? If you cancel, the game will reload.";

Implements:
Source:

Methods

end()

End the busy indicator. If there is an associated timeout, this is cleared. Once called the instance has no further use and any references should be discarded.

Implements:
Source:

start()

Start the indicator. This should only be called once. Calling start multiple times results in an error being thrown.

Implements:
Source:
Throws:
Error