[Go to site: main page, start]

A form input element custom tailored to formula expressions.

edit Fired when the formula editor has been requested.

<formula-input context="default">8 + @prof + @abilities.cha.mod</formula-input>
HTMLFormulaInputElement.create({ value: "8 + @prof + @abilities.cha.mod" });

Hierarchy (View Summary)

Index

Properties

button: HTMLButtonElement

A button to open the formula editor interface.

A reference to the formula editor application instance spawned by this element.

input: HTMLInputElement

The formula input.

_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: any

The underlying value of the element.

formAssociated: boolean = true

Declare that this custom element provides form element functionality.

observedAttributes: string[] = ...

Attributes requiring change notifications

tagName: string = "formula-input"

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 context(): string

    An identifier to distinguish contexts a formula might be in, which may control which auto-complete suggestions are available, or other behavior. Context configuration is available in CONFIG.formulaEditor.

    Returns string

  • 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 name(): string

    The input element name.

    Returns string

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

    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

  • Protected

    Translate user-provided input value into the format that should be stored.

    Parameters

    • value: any

      A new value to assign to the element

    Returns void

    An error if the provided value is invalid