Documentation
    Preparing search index...

    Hierarchy

    • HandlebarsApplication<this> & ApplicationV2<
          RenderContext,
          Configuration,
          RenderOptions,
          this,
      >
      • SpriteAnimationPlayer
    Index

    Constructors

    Properties

    "[___Configuration]": Configuration
    "[___RenderContext]": RenderContext
    "[___RenderOptions]": RenderOptions
    actor: Actor
    animationQueue: AnimationConfig[] = []
    options: Readonly<Configuration>

    Application instance configuration options.

    position: Position

    The current position of the application with respect to the window.document.body.

    tabGroups: Record<string, string | null>

    If this Application uses tabbed navigation groups, this mapping is updated whenever the changeTab method is called. Reports the active tab for each group, with a value of null indicating no tab is active. Subclasses may override this property to define default tabs for each group.

    token: Token
    _appId: number

    An incrementing integer Application ID.

    _maxZ: number

    The current maximum z-index of any displayed Application.

    "[___ApplicationV2Brand]": never
    BASE_APPLICATION: typeof ApplicationV2

    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.

    DEFAULT_OPTIONS: {
        actions: {
            clearQueue: (this: SpriteAnimationPlayer) => Promise<void>;
            playAnimation: (
                this: SpriteAnimationPlayer,
                e: Event,
                elem: HTMLElement,
            ) => Promise<void>;
            playQueue: (this: SpriteAnimationPlayer) => Promise<void>;
            queueAnimation: (
                this: SpriteAnimationPlayer,
                e: Event,
                elem: HTMLElement,
            ) => Promise<void>;
            removeQueueItem: (
                this: SpriteAnimationPlayer,
                e: Event,
                elem: HTMLElement,
            ) => Promise<void>;
        };
        form: { closeOnSubmit: boolean };
        position: { width: number };
        tag: string;
        window: { contentClasses: string[]; icon: string; title: string };
    } = ...
    emittedEvents: string[]

    An array of event types which are valid for this class.

    PARTS: Record<
        string,
        foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart,
    > = ...
    RENDER_STATES: {
        CLOSED: -1;
        CLOSING: -2;
        ERROR: -3;
        NONE: 0;
        RENDERED: 2;
        RENDERING: 1;
    }

    The sequence of rendering states that describe the Application life-cycle.

    TABS: Record<string, ApplicationV2.TabsConfiguration>

    Configuration of application tabs, with an entry per tab group.

    {}

    Accessors

    • get classList(): DOMTokenList

      The CSS class list of this Application instance

      Returns DOMTokenList

    • get element(): HTMLElement

      The HTMLElement which renders this Application into the DOM.

      Returns HTMLElement

    • get form(): null | HTMLFormElement

      Does this Application have a top-level form element?

      Returns null | HTMLFormElement

    • get hasFrame(): boolean

      Does this Application instance render within an outer window frame?

      Returns boolean

    • get id(): string

      The HTML element ID of this Application instance. This provides a readonly view into the internal ID used by this application. This getter should not be overridden by subclasses, which should instead configure the ID in DEFAULT_OPTIONS or by defining a uniqueId during _initializeApplicationOptions.

      Returns string

    • get minimized(): boolean

      Is this Application instance currently minimized?

      Returns boolean

    • get parts(): Record<string, HTMLElement>

      A record of all rendered template parts.

      Returns Record<string, HTMLElement>

      {}

    • get rendered(): boolean

      Is this Application instance currently rendered?

      Returns boolean

    • get state(): -3 | -2 | -1 | 0 | 1 | 2

      The current render state of the Application.

      Returns -3 | -2 | -1 | 0 | 1 | 2

    • get title(): string

      A convenience reference to the title of the Application window.

      Returns string

    • get window(): Window

      Convenience references to window header elements.

      Returns Window

    Methods

    • Attach event listeners to the Application frame.

      Returns void

    • Attach event listeners to rendered template parts.

      Parameters

      • partId: string

        The id of the part being rendered

      • htmlElement: HTMLElement

        The rendered HTML element for the part

      • options: { parts?: string[] }

        Rendering options passed to the render method

      Returns void

    • Internal

      Wait for a CSS transition to complete for an element.

      Parameters

      • element: HTMLElement

        The element which is transitioning

      • timeout: number

        A timeout in milliseconds in case the transitionend event does not occur

      Returns Promise<void>

    • Test whether this Application is allowed to be rendered.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns false | void

      Return false to prevent rendering

      An Error to display a warning message

    • Parameters

      • options: { parts?: string[] }

      Returns void

    • Modify the provided options passed to a render request.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Allow subclasses to dynamically configure render parts.

      Parameters

      • options: RenderOptions

      Returns Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>

    • Create a ContextMenu instance used in this Application.

      Parameters

      • handler: CreateContextMenuHandler

        A handler function that provides initial context options

      • selector: string

        A CSS selector to which the ContextMenu will be bound

      • options: CreateContextMenuOptions

        Additional options which affect ContextMenu construction

      Returns null | ContextMenu<true>

      A created ContextMenu or null if no menu items were defined

    • Perform 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.

      Type Parameters

      • HandlerArgs extends AnyArray
      • Async extends undefined | boolean = false

      Parameters

      • handler: (...args: HandlerArgs) => Async extends true ? Promise<void> : void

        A handler function to call

      • Optionaloptions: InexactPartial<DoEventOptions<HandlerArgs, Async>>

        Options which configure event handling

      Returns Async extends true ? Promise<void> : void

      A promise which resoles once the handler is complete if async is true

    • Configure the array of header control menu options

      Returns HeaderControlsEntry[]

    • Get the configuration for a tabs group.

      Parameters

      • group: string

        The ID of a tabs group

      Returns null | TabsConfiguration

    • Iterate over header control buttons, filtering for controls which are visible for the current client.

      Returns Generator<HeaderControlsEntry, void, undefined>

    • 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.

      • Array-based options are concatenated
      • Inner objects are merged
      • Otherwise, properties in the subclass replace those defined by a parent

      Parameters

      • options: {
            actions?: {
                [key: string]:
                    | undefined
                    | ClickAction
                    | { buttons?: number[]; handler?: ClickAction };
            };
            classes?: string[];
            form?: {
                closeOnSubmit?: boolean;
                handler?: FormSubmission;
                submitOnChange?: boolean;
            };
            id?: string;
            position?: {
                height?: number
                | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tag?: string;
            uniqueId?: string;
            window?: {
                contentClasses?: string[];
                contentTag?: string;
                controls?: HeaderControlsEntry[];
                frame?: boolean;
                icon?: string
                | false;
                minimizable?: boolean;
                positioned?: boolean;
                resizable?: boolean;
                title?: string;
            };
        }

        Options provided directly to the constructor

        • Optionalactions?: {
              [key: string]:
                  | undefined
                  | ClickAction
                  | { buttons?: number[]; handler?: ClickAction };
          }

          Click actions supported by the Application and their event handler functions. A handler function can be defined directly which only responds to left-click events. Otherwise, an object can be declared containing both a handler function and an array of buttons which are matched against the PointerEvent#button property.

        • Optionalclasses?: string[]

          An array of CSS classes to apply to the Application

        • Optionalform?: { closeOnSubmit?: boolean; handler?: FormSubmission; submitOnChange?: boolean }

          Configuration used if the application top-level element is a form

        • Optionalid?: string

          An HTML element identifier used for this Application instance

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          Default positioning data for the application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltag?: string

          The HTMLElement tag type used for the outer Application frame

        • OptionaluniqueId?: string

          An string discriminator substituted for {id} in the default HTML element identifier for the class

        • Optionalwindow?: {
              contentClasses?: string[];
              contentTag?: string;
              controls?: HeaderControlsEntry[];
              frame?: boolean;
              icon?: string | false;
              minimizable?: boolean;
              positioned?: boolean;
              resizable?: boolean;
              title?: string;
          }

          Configuration of the window behaviors for this Application

          • OptionalcontentClasses?: string[]

            Additional CSS classes to apply to the .window-content element

          • OptionalcontentTag?: string

            A specific tag name to use for the .window-content element

            "section"

          • Optionalcontrols?: HeaderControlsEntry[]

            An array of window control entries

          • Optionalframe?: boolean

            Is this Application rendered inside a window frame?

            true

          • Optionalicon?: string | false

            An optional Font Awesome icon class displayed left of the window title

          • Optionalminimizable?: boolean

            Can the window app be minimized by double-clicking on the title

            true

          • Optionalpositioned?: boolean

            Can this Application be positioned via JavaScript or only by CSS

            true

          • Optionalresizable?: boolean

            Is this window resizable?

            false

          • Optionaltitle?: string

            The window title. Displayed only if the application is framed

      Returns Configuration

      Configured options for the application instance

    • Insert the application HTML element into the DOM. Subclasses may override this method to customize how the application is inserted.

      Parameters

      • element: HTMLElement

        The element to insert

      Returns void

      The inserted element

    • Handle changes to an input element within the form.

      Parameters

      • formConfig: FormConfiguration

        The form configuration for which this handler is bound

      • event: Event

        The form submission event

      Returns void

    • 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.

      Parameters

      • event: PointerEvent

        The originating click event

      • target: ActionTarget

        The capturing HTML element which defined a [data-action]

      Returns void

    • Handle click events on a tab within the Application.

      Parameters

      • event: PointerEvent

      Returns void

    • Actions performed after closing the Application. Post-close steps are not awaited by the close process.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Actions performed after a first render of the Application.

      Parameters

      • context: {
            tabs?: {
                [key: string]:
                    | undefined
                    | {
                        active?: boolean;
                        cssClass?: string;
                        group?: string;
                        icon?: null
                        | string;
                        id?: string;
                        label?: null | string;
                    };
            };
        }

        Prepared context data

        • Optionaltabs?: {
              [key: string]:
                  | undefined
                  | {
                      active?: boolean;
                      cssClass?: string;
                      group?: string;
                      icon?: null
                      | string;
                      id?: string;
                      label?: null | string;
                  };
          }

          Tab data prepared from an entry in ApplicationV2.TABS

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<void>

    • Actions performed after the Application is re-positioned.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Actions performed after any render of the Application.

      Parameters

      • context: {
            tabs?: {
                [key: string]:
                    | undefined
                    | {
                        active?: boolean;
                        cssClass?: string;
                        group?: string;
                        icon?: null
                        | string;
                        id?: string;
                        label?: null | string;
                    };
            };
        }

        Prepared context data

        • Optionaltabs?: {
              [key: string]:
                  | undefined
                  | {
                      active?: boolean;
                      cssClass?: string;
                      group?: string;
                      icon?: null
                      | string;
                      id?: string;
                      label?: null | string;
                  };
          }

          Tab data prepared from an entry in ApplicationV2.TABS

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<void>

    • Handle submission for an Application which uses the form element.

      Parameters

      • formConfig: FormConfiguration

        The form configuration for which this handler is bound

      • event: Event | SubmitEvent

        The form submission event

      Returns Promise<void>

    • Actions performed before closing the Application. Pre-close steps are awaited by the close process.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<void>

    • Actions performed before a first render of the Application.

      Parameters

      • context: {
            tabs?: {
                [key: string]:
                    | undefined
                    | {
                        active?: boolean;
                        cssClass?: string;
                        group?: string;
                        icon?: null
                        | string;
                        id?: string;
                        label?: null | string;
                    };
            };
        }

        Prepared context data

        • Optionaltabs?: {
              [key: string]:
                  | undefined
                  | {
                      active?: boolean;
                      cssClass?: string;
                      group?: string;
                      icon?: null
                      | string;
                      id?: string;
                      label?: null | string;
                  };
          }

          Tab data prepared from an entry in ApplicationV2.TABS

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<void>

    • Prepare context that is specific to only a single rendered part.

      It is recommended to augment or mutate the shared context so that downstream methods like _onRender have visibility into the data that was used for rendering. It is acceptable to return a different context object rather than mutating the shared context at the expense of this transparency.

      Parameters

      • partId: string

        The part being rendered

      • context: RenderContext

        Shared context provided by _prepareContext

      • options: { parts?: string[] }

        Options which configure application rendering behavior

      Returns Promise<RenderContext>

      Context data for a specific part

    • Prepare application tab data for a single tab group.

      Parameters

      • group: string

        The ID of the tab group to prepare

      Returns Record<string, ApplicationV2.Tab>

    • Actions performed before the Application is re-positioned. Pre-position steps are not awaited because setPosition is synchronous.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Provided render options

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Parameters

      • context: {
            tabs?: {
                [key: string]:
                    | undefined
                    | {
                        active?: boolean;
                        cssClass?: string;
                        group?: string;
                        icon?: null
                        | string;
                        id?: string;
                        label?: null | string;
                    };
            };
        }
        • Optionaltabs?: {
              [key: string]:
                  | undefined
                  | {
                      active?: boolean;
                      cssClass?: string;
                      group?: string;
                      icon?: null
                      | string;
                      id?: string;
                      label?: null | string;
                  };
          }

          Tab data prepared from an entry in ApplicationV2.TABS

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }
        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<void>

    • Prepare data used to synchronize the state of a template part.

      Parameters

      • partId: string

        The id of the part being rendered

      • newElement: HTMLElement

        The new rendered HTML element for the part

      • priorElement: HTMLElement

        The prior rendered HTML element for the part

      • state: PartState

        A state object which is used to synchronize after replacement

      Returns void

    • Remove the application HTML element from the DOM. Subclasses may override this method to customize how the application element is removed.

      Parameters

      • element: HTMLElement

        The element to be removed

      Returns void

    • Render the outer framing HTMLElement which wraps the inner HTML of the Application.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<HTMLElement>

    • Render a header control button.

      Parameters

      • control: HeaderControlsEntry

      Returns HTMLLIElement

    • Render each configured application part using Handlebars templates.

      Parameters

      • context: RenderContext

        Context data for the render operation

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<Record<string, HTMLElement>>

      A single rendered HTMLElement for each requested part

    • Render an HTMLElement for the Application. An Application subclass must implement this method in order for the Application to be renderable.

      Parameters

      • context: RenderContext

        Context data for the render operation

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<unknown>

      The result of HTML rendering may be implementation specific. Whatever value is returned here is passed to _replaceHTML

    • Replace the HTML of the application with the result provided by Handlebars rendering.

      Parameters

      • result: Record<string, HTMLElement>

        The result from Handlebars template rendering

      • content: HTMLElement

        The content element into which the rendered result must be inserted

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Replace the HTML of the application with the result provided by the rendering backend. An Application subclass should implement this method in order for the Application to be renderable.

      Parameters

      • result: unknown

        The result returned by the application rendering backend

      • content: HTMLElement

        The content element into which the rendered result must be inserted

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • Synchronize the state of a template part after it has been rendered and replaced in the DOM.

      Parameters

      • partId: string

        The id of the part being rendered

      • newElement: HTMLElement

        The new rendered HTML element for the part

      • priorElement: HTMLElement

        The prior rendered HTML element for the part

      • state: PartState

        A state object which is used to synchronize after replacement

      Returns void

    • Parameters

      • options: { animate?: boolean; closeKey?: boolean; submitted?: boolean }
        • Optionalanimate?: boolean

          Whether to animate the close, or perform it instantaneously

        • OptionalcloseKey?: boolean

          Whether the application was closed via keypress.

        • Optionalsubmitted?: boolean

          Is the application being closed because a form was submitted?

      Returns void

    • When the Application is rendered, optionally update aspects of the window frame.

      Parameters

      • options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options provided at render-time

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns void

    • 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.

      Parameters

      • position: Position

        Requested Application positioning data

      Returns Position

      Resolved Application positioning data

    • Add a new event listener for a certain type of event.

      Parameters

      • type: string

        The type of event being registered for

      • listener: EventListener

        The listener function called when the event occurs

      • Optionaloptions: AddListenerOptions

        Options which configure the event listener

      Returns void

    • Bring this Application window to the front of the rendering stack by increasing its z-index. Once ApplicationV1 is deprecated we should switch from _maxZ to ApplicationV2#maxZ We should also eliminate ui.activeWindow in favor of only ApplicationV2#frontApp

      Returns void

    • Returns void

      since v12, will be removed in v14

      "ApplicationV2#bringToTop is not a valid function and redirects to ApplicationV2#bringToFront. This shim will be removed in v14."

    • Change the active tab within a tab group in this Application instance.

      Parameters

      • tab: string

        The name of the tab which should become active

      • group: string

        The name of the tab group which defines the set of tabs

      • Optionaloptions: ChangeTabOptions

        Additional options which affect tab navigation (default: {})

      Returns void

    • Close the Application, removing it from the DOM.

      Parameters

      • Optionaloptions: { animate?: boolean; closeKey?: boolean; submitted?: boolean }

        Options which modify how the application is closed.

        • Optionalanimate?: boolean

          Whether to animate the close, or perform it instantaneously

        • OptionalcloseKey?: boolean

          Whether the application was closed via keypress.

        • Optionalsubmitted?: boolean

          Is the application being closed because a form was submitted?

      Returns Promise<SpriteAnimationPlayer>

      A Promise which resolves to the closed Application instance

    • Dispatch an event on this target.

      Parameters

      • event: Event

        The Event to dispatch

      Returns boolean

      Was default behavior for the event prevented?

    • Restore the Application to its original dimensions.

      Returns Promise<void>

    • Minimize the Application, collapsing it to a minimal header.

      Returns Promise<void>

    • Remove an event listener for a certain type of event.

      Parameters

      • type: string

        The type of event being removed

      • listener: EventListener

        The listener function being removed

      Returns void

    • 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.

      Parameters

      • Optionaloptions: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Options which configure application rendering behavior. A boolean is interpreted as the "force" option. (default: {})

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<SpriteAnimationPlayer>

      A Promise which resolves to the rendered Application instance

    • Parameters

      • options: boolean
      • Optional_options: {
            force?: boolean;
            isFirstRender?: boolean;
            parts?: string[];
            position?: {
                height?: number | "auto";
                left?: number;
                scale?: number;
                top?: number;
                width?: number | "auto";
                zIndex?: number;
            };
            tab?: string
            | { [key: string]: undefined | string };
            window?: { controls?: boolean; icon?: string | false; title?: string };
        }

        Legacy options for backwards-compatibility with the original ApplicationV1#render signature. (default: {})

        • Optionalforce?: boolean

          Force application rendering. If true, an application which does not yet exist in the DOM is added. If false, only applications which already exist are rendered.

        • OptionalisFirstRender?: boolean

          Is this render the first one for the application? This property is populated automatically.

        • Optionalparts?: string[]

          Some Application classes, for example the HandlebarsApplication, support re-rendering a subset of application parts instead of the full Application HTML.

        • Optionalposition?: {
              height?: number | "auto";
              left?: number;
              scale?: number;
              top?: number;
              width?: number | "auto";
              zIndex?: number;
          }

          A specific position at which to render the Application

          • Optionalheight?: number | "auto"

            Un-scaled pixels in height or "auto"

            "auto"
            
          • Optionalleft?: number

            Window offset pixels from left

          • Optionalscale?: number

            A numeric scaling factor applied to application dimensions

          • Optionaltop?: number

            Window offset pixels from top

          • Optionalwidth?: number | "auto"

            Un-scaled pixels in width or "auto"

            "auto"
            
          • OptionalzIndex?: number

            A z-index of the application relative to siblings

        • Optionaltab?: string | { [key: string]: undefined | string }

          A tab to activate. Either the tab's ID for applications with only one tab group, or an object of tab groups to tab IDs. Re-rendering an Application with this option will not trigger changeTab.

        • Optionalwindow?: { controls?: boolean; icon?: string | false; title?: string }

          Updates to the Application window frame

          • Optionalcontrols?: boolean

            Re-render the window controls menu?

          • Optionalicon?: string | false

            Update the window icon with a new value?

          • Optionaltitle?: string

            Update the window title with a new value?

      Returns Promise<SpriteAnimationPlayer>

      Exists for backwards compatibility with the original ApplicationV1#render signature.

    • Update the Application element position using provided data which is merged with the prior position.

      Parameters

      • position: {
            height?: number | "auto";
            left?: number;
            scale?: number;
            top?: number;
            width?: number | "auto";
            zIndex?: number;
        }

        New Application positioning data

        • Optionalheight?: number | "auto"

          Un-scaled pixels in height or "auto"

          "auto"
          
        • Optionalleft?: number

          Window offset pixels from left

        • Optionalscale?: number

          A numeric scaling factor applied to application dimensions

        • Optionaltop?: number

          Window offset pixels from top

        • Optionalwidth?: number | "auto"

          Un-scaled pixels in width or "auto"

          "auto"
          
        • OptionalzIndex?: number

          A z-index of the application relative to siblings

      Returns void | Position

    • Programmatically submit an ApplicationV2 instance which implements a single top-level form.

      Parameters

      • OptionalsubmitOptions: AnyObject

        Arbitrary options which are supported by and provided to the configured form submission handler.

      Returns Promise<void>

      A promise that resolves to the returned result of the form submission handler, if any.

      Return is accurate to 13.340, but https://github.com/foundryvtt/foundryvtt/issues/12661 classifies it as a bug. Correct return is based on the handler.

    • Toggle display of the Application controls menu. Only applicable to window Applications.

      Parameters

      • Optionalexpanded: null | boolean

        Set the controls visibility to a specific state. Otherwise, the visible state is toggled from its current value. null is same as undefined

      • Optionaloptions: ToggleControlOptions

        Options to configure the toggling behavior

      Returns Promise<void>

      A Promise which resolves once the control expansion animation is complete

    • Iterate over the inheritance chain of this Application. The chain includes this Application itself and all parents until the base application is encountered.

      Returns Generator<AnyConstructor, void, undefined>

    • Parse a CSS style rule into a number of pixels which apply to that dimension.

      Parameters

      • style: string

        The CSS style rule

      • parentDimension: number

        The relevant dimension of the parent element

      Returns undefined | number

      The parsed style dimension in pixels

    • Wait for any images in the given element to load.

      Parameters

      • element: HTMLElement

        The element.

      Returns Promise<void>