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

    A custom HTMLElement used to render a set of associated Documents referenced by UUID.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _internals: ElementInternals

    Attached ElementInternals which provides form handling functionality.

    _primaryInput: HTMLElement

    The primary input (if any). Used to determine what element should receive focus when an associated label is clicked on.

    _value: Record<string, string> = {}
    formAssociated: boolean = true

    Declare that this custom element provides form element functionality.

    observedAttributes: string[] = ...

    Attributes requiring change notifications

    tagName: string = "document-tags"

    Accessors

    • get abortSignal(): AbortSignal

      An AbortSignal that can be passed to event listeners registered in subclasses. The signal will ensure that the listener is removed when the element is disconnected from the DOM. Not available in the constructor.

      Returns AbortSignal

    • get disabled(): boolean

      Is this element disabled?

      Returns boolean

    • get editable(): boolean

      Is this field editable? The field can be neither disabled nor readonly.

      Returns boolean

    • get form(): HTMLFormElement

      The form this element belongs to.

      Returns HTMLFormElement

    • get max(): number

      Allow a maximum number of documents to be tagged to the element.

      Returns number

    • get name(): string

      The input element name.

      Returns string

    • get single(): boolean

      Restrict to only allow referencing a single Document instead of an array of documents.

      Returns boolean

    • get type(): string | null

      Restrict this element to documents of a particular type.

      Returns string | null

    Methods

    • Internal

      Apply key attributes on the containing custom HTML element to input elements contained within it.

      Parameters

      • input: HTMLElement

      Returns void

    • Protected

      A method provided for subclasses to perform tear-down workflows as an alternative to overriding disconnectedCallback.

      Returns void

    • Protected

      Initialize innerText or an initial value attribute of the element as a serialized JSON array.

      Parameters

      • Optionalvalues: string[]

        An array of Document UUIDs to initialize the element with.

      Returns void

    • Protected

      Special handling when the custom element is clicked. This should be implemented to transfer focus to an appropriate internal element.

      Parameters

      • event: PointerEvent

      Returns void

    • Create an HTML string fragment for a single document tag.

      Parameters

      • uuid: string

        The document UUID

      • name: string

        The document name

      • Optionaleditable: boolean = true

        Is the tag editable?

      Returns HTMLDivElement