UserFocusController
Purpose
A utility controller to wire up other stimulus actions when the user is active on a page, and when the page gets minimised/loses focus.
Actions
Action | Purpose |
---|---|
- | - |
Targets
Target | Purpose | Default |
---|---|---|
- | - | - |
Classes
Class | Purpose | Default |
---|---|---|
- | - | - |
Values
Value | Type | Description | Default |
---|---|---|---|
- | - | - | - |
Events
Event | When | Dispatched on | event.detail |
---|---|---|---|
user-focus:active | When the user becomes active on the page | the controller root element | - |
user-focus:away | When the page gets minimized or loses focus | the controller root element | - |
Side Effects
The controller will install event listeners for:
Window
:
focus
blur
Document
:
visibilitychange