HTML element that wraps the Exit This Page button
Optional
config: ExitThisPageConfig = {}Exit This Page config
Protected
_$rootPrivate
$buttonPrivate
$indicatorPrivate
$overlayPrivate
$skiplinkPrivate
$updatePrivate
configPrivate
i18nPrivate
keypressPrivate
keypressPrivate
lastPrivate
timeoutPrivate
timeoutStatic
Constant
defaultsExit this page default config
Static
elementStatic
moduleName for the component used when initialising using data-module attributes.
Static
Constant
schemaExit this page config schema
Protected
$rootProtected
Returns the root element of the component
Private
buildPrivate
exitPrivate
Initiates the redirection away from the current page. Includes the loading overlay functionality, which covers the current page with a white overlay so that the contents are not visible during the loading process. This is particularly important on slow network connections.
Private
handlePrivate
Pre-activation logic for when the button is clicked/activated via mouse or pointer.
We do this to differentiate it from the keyboard activation event because we
need to run e.preventDefault
as the button or skiplink are both links and we
want to apply some additional logic in exitPage
before navigating.
mouse click event
Private
handlePrivate
initPrivate
initPrivate
resetPrivate
resetPrivate
Reset the page using the EtP button
We use this in situations where a user may re-enter a page using the browser back button. In these cases, the browser can choose to restore the state of the page as it was previously, including restoring the 'ghost page' overlay, the announcement span having it's role set to "alert" and the keypress indicator still active, leaving the page in an unusable state.
By running this check when the page is shown, we can programatically restore the page and the component to a "default" state
Private
setPrivate
Starts the 'quick escape' keyboard sequence timer.
This can be invoked several times. We want this to be possible so that the timer is restarted each time the shortcut key is pressed (e.g. the user has up to n seconds between each keypress, rather than n seconds to invoke the entire sequence.)
Private
updateStatic
check
Exit this page component