SerenityJS
    Preparing search index...

    Hierarchy (View Summary)

    • Form<boolean>
      • MessageForm
    Index

    Constructors

    • Create a new server-sided message form.

      Parameters

      • title: string

        The title of the form.

      • Optionalcontent: string

        The content of the form; defaults to an empty string.

      • Optionalbutton1: string

        The text of the first button; defaults to "OK".

      • Optionalbutton2: string

        The text of the second button; defaults to "Cancel".

      Returns MessageForm

    Properties

    button1: string

    The text of the first button.

    button2: string

    The text of the second button.

    content: string

    The content of the form.

    formId: number = ++Form.formId

    The form id of the form.

    title: string

    The title of the form.

    type: Message = ModalFormType.Message

    The type of form.

    formId: number = 0

    The next form id to use when creating a new form.

    Methods

    • Shows the form to a player and returns a promise that resolves with the form response.

      Parameters

      • player: Player

        The player to show the form to.

      Returns Promise<null | boolean>

      A promise that resolves with the form response or null if the form was closed without a response.