import DomUtilities from 'django_cradmin/scripts/django_cradmin/utilities/DomUtilities.js'DomUtilities
General purpose DOM utilities.
Static Method Summary
| Static Public Methods | ||
| public static |
forceFocus(domElement: Element, maxAttempts: Number, pollIntervalMilliseconds: Number) Force focus on a DOM element. |
|
| public static |
hide(element: *) |
|
| public static |
|
|
Static Public Methods
public static forceFocus(domElement: Element, maxAttempts: Number, pollIntervalMilliseconds: Number) source
Force focus on a DOM element.
Works around timing issues with visibility and signals by trying multiple times with a short interval between each attempt.
Params:
| Name | Type | Attribute | Description |
| domElement | Element | A DOM Element. |
|
| maxAttempts | Number | Number of attempts to make. The first attempt
is made at once, and the other attempts is performed each
|
|
| pollIntervalMilliseconds | Number | Numer of milliseconds between each attempt. |
public static hide(element: *) source
Params:
| Name | Type | Attribute | Description |
| element | * |