Applications are constructed by providing an object of configuration options.
Optional
options: Partial<applications.types.ApplicationConfiguration & DialogV2Configuration> = {}Options used to configure the Application instance
Application instance configuration options.
If this Application uses tabbed navigation groups, this mapping is updated whenever the changeTab method is called. Reports the active tab for each group. Subclasses may override this property to define default tabs for each group.
The current position of the application with respect to the window.document.body.
Private
#idPrivate
#renderableFlag that this Application instance is renderable. Applications are not renderable unless a subclass defines the _renderHTML and _replaceHTML methods.
Private
#elementThe outermost HTMLElement of this rendered Application. For window applications this is ApplicationV2##frame. For non-window applications this ApplicationV2##content.
Private
#contentThe HTMLElement within which inner HTML is rendered. For non-window applications this is the same as ApplicationV2##element.
Private
#minimizationData pertaining to the minimization status of the Application.
Private
#positionThe rendered position of the Application.
Private
#statePrivate
#semaphoreA Semaphore used to enqueue asynchronous operations.
Private
#controlsIs the window control buttons menu currently expanded?
Private
#eventsA mapping of registered events.
Static
DEFAULT_The default configuration options which are assigned to every instance of this Application class.
Static
BASE_Designates which upstream Application class in this class' inheritance chain is the base application. Any DEFAULT_OPTIONS of super-classes further upstream of the BASE_APPLICATION are ignored. Hook events for super-classes further upstream of the BASE_APPLICATION are not dispatched.
Static
RENDER_The sequence of rendering states that describe the Application life-cycle.
Static
emittedConvenience references to window header elements.
The CSS class list of this Application instance
The HTML element ID of this Application instance.
A convenience reference to the title of the Application window.
The HTMLElement which renders this Application into the DOM.
Is this Application instance currently minimized?
Is this Application instance currently rendered?
The current render state of the Application.
Does this Application instance render within an outer window frame?
Initialize configuration options for the Application instance. The default behavior of this method is to intelligently merge options for each class with those of their parents.
Options provided directly to the constructor
Configured options for the application instance
Render the Application, creating its HTMLElement and replacing its innerHTML. Add it to the DOM if it is not currently rendered and rendering is forced. Otherwise, re-render its contents.
Optional
options: any = {}Options which configure application rendering behavior. A boolean is interpreted as the "force" option.
Optional
_options: any = {}Legacy options for backwards-compatibility with the original ApplicationV1#render signature.
A Promise which resolves to the rendered Application instance
Close the Application, removing it from the DOM.
Optional
options: ApplicationClosingOptions = {}Options which modify how the application is closed.
A Promise which resolves to the closed Application instance
Update the Application element position using provided data which is merged with the prior position.
Optional
position: Partial<ApplicationPosition>New Application positioning data
The updated application position
Change the active tab within a tab group in this Application instance.
The name of the tab which should become active
The name of the tab group which defines the set of tabs
Optional
options: { Additional options which affect tab navigation
An interaction event which caused the tab change, if any
An explicit navigation element being modified
Force changing the tab even if the new tab is already active
Update application position after changing the tab?
Add a new event listener for a certain type of event.
The type of event being registered for
The listener function called when the event occurs
Optional
options: { Options which configure the event listener
Should the event only be responded to once and then removed
Remove an event listener for a certain type of event.
The type of event being removed
The listener function being removed
Protected
_renderProtected
_onProtected
_onProtected
_configureProtected
_prepareProtected
_getProtected
Configure the array of header control menu options
Protected
_headerProtected
Iterate over header control buttons, filtering for controls which are visible for the current client.
Protected
_renderProtected
_renderProtected
Render a header control button.
Protected
_updateProtected
_insertProtected
_removeProtected
_updateProtected
Translate a requested application position updated into a resolved allowed position for the Application. Subclasses may override this method to implement more advanced positioning behavior.
Requested Application positioning data
Resolved Application positioning data
Protected
_canProtected
_preProtected
_preProtected
_onProtected
_preProtected
_onProtected
_preProtected
Actions performed before the Application is re-positioned. Pre-position steps are not awaited because setPosition is synchronous.
The requested application position
Protected
_onProtected
Actions performed after the Application is re-positioned.
The requested application position
Protected
_onProtected
A generic event handler for action clicks which can be extended by subclasses. Action handlers defined in DEFAULT_OPTIONS are called first. This method is only called for actions which have no defined handler.
The originating click event
The capturing HTML element which defined a [data-action]
Protected
_onProtected
Handle submission for an Application which uses the form element.
The form configuration for which this handler is bound
The form submission event
Private
#renderManage the rendering step of the Application life-cycle. This private method delegates out to several protected methods which can be defined by the subclass.
Optional
options: anyOptions which configure application rendering behavior
A Promise which resolves to the rendered Application instance
Private
#closeManage the closing step of the Application life-cycle. This private method delegates out to several protected methods which can be defined by the subclass.
Optional
options: ApplicationClosingOptionsOptions which modify how the application is closed
A Promise which resolves to the rendered Application instance
Private
#applyApply validated position changes to the element.
The new position data to apply.
Private
#doPerform an event in the application life-cycle. Await an internal life-cycle method defined by the class. Optionally dispatch an event for any registered listeners.
A handler function to call
Options which configure event handling
Await the result of the handler function?
Arguments passed to the handler function
Debugging text to log for the event
An event name to dispatch for registered listeners
A hook name to dispatch for this and all parent classes
Arguments passed to the requested hook function
A promise which resoles once the handler is complete
Private
#onPrivate
#onPrivate
#onPrivate
#onPrivate
#startPrivate
#endPrivate
#onHandle a pointer move event while dragging or resizing the window frame.
The amount the cursor has moved since the last frame, or undefined if the movement occurred between frames.
Private
#onPrivate
#onPrivate
#onPrivate
#onPrivate
#onStatic
confirmA utility helper to generate a dialog with yes and no buttons.
Optional
options: Partial<applications.types.ApplicationConfiguration & DialogV2Configuration & DialogV2WaitOptions> = {}Resolves to true if the yes button was pressed, or false if the no button was pressed. If additional buttons were provided, the Promise resolves to the identifier of the one that was pressed, or the value returned by its callback. If the dialog was dismissed, and rejectClose is false, the Promise resolves to null.
Static
promptA utility helper to generate a dialog with a single confirmation button.
Optional
options: Partial<applications.types.ApplicationConfiguration & DialogV2Configuration & DialogV2WaitOptions> = {}Resolves to the identifier of the button used to submit the dialog, or the value returned by that button's callback. If the dialog was dismissed, and rejectClose is false, the Promise resolves to null.
Static
waitSpawn a dialog and wait for it to be dismissed or submitted.
Optional
options: Partial<applications.types.ApplicationConfiguration & DialogV2Configuration> = {}Resolves to the identifier of the button used to submit the dialog, or the value returned by that button's callback. If the dialog was dismissed, and rejectClose is false, the Promise resolves to null.
Static
inheritanceIterate over the inheritance chain of this Application. The chain includes this Application itself and all parents until the base application is encountered.
ApplicationV2.BASE_APPLICATION
Static
parseCSSDimensionStatic
Protected
_on
A lightweight Application that renders a dialog containing a form with arbitrary content, and some buttons.
Example: Prompt the user to confirm an action.
Example: Prompt the user for some input.
Example: A custom dialog.