Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class default

    A singleton class that provides an API for spawning and managing detached windows.

    Index

    Accessors

    • get focused(): Window | null

      The currently-focused window.

      Returns Window | null

    • get windows(): Map<string, DetachedWindowDescriptor>

      A registry of detached window instances.

      Returns Map<string, DetachedWindowDescriptor>

    Methods

    • Internal

      Handle tear-down when a detached window is closed.

      Parameters

      • win: Window

        The window instance.

      Returns void

    • Adopt nodes into a new host window and append them to the given target.

      Parameters

      • target: HTMLElement

        The target.

      • ...nodes: Node[]

        The nodes.

      Returns void

    • Check if a detached window contains any applications, and closes it if there are none.

      Parameters

      • win: Window

        The window.

      Returns void

    • Copy attributes between two elements.

      Parameters

      • from: HTMLElement

        The element to copy from.

      • to: HTMLElement

        The element to copy to.

      • Optionaloptions: { attrs?: Iterable<string, any, any> } = {}
        • Optionalattrs?: Iterable<string, any, any>

          Copy only the specified attributes.

      Returns void

    • Import nodes into a new host window and append them to the given target.

      Parameters

      • target: HTMLElement

        The target.

      • ...nodes: Node[]

        The nodes.

      Returns void

    • Performs a DOM query across all detached windows and the main workspace, and return the first match.

      Parameters

      • selector: string

        The query selector.

      Returns HTMLElement | null

    • Perform a DOM query across all detached windows and the main workspace, and return all matches.

      Parameters

      • selector: string

        The query selector.

      Returns HTMLElement[]