Class H5PConfirmationDialog

Hierarchy-Diagram

UML class diagram of H5PConfirmationDialog
Legend
icon for a class in the UML class diagram class
icon for a public property in the UML class diagram public property
icon for a public method in the UML class diagram public method

Hierarchy (view full)

Constructors

  • Parameters

    • options: {
          cancelText?: string;
          classes?: string[];
          confirmText?: string;
          dialogText?: string;
          headerText?: string;
          hideCancel?: boolean;
          hideExit?: boolean;
          instance: IH5PContentType<unknown>;
          skipRestoreFocus?: boolean;
      }
      • Optional cancelText?: string
      • Optional classes?: string[]
      • Optional confirmText?: string
      • Optional dialogText?: string
      • Optional headerText?: string
      • Optional hideCancel?: boolean
      • Optional hideExit?: boolean
      • instance: IH5PContentType<unknown>
      • Optional skipRestoreFocus?: boolean

    Returns H5PConfirmationDialog

Properties

off: (<TData>(type, listener?) => void)

Remove event listener If no listener is specified, all listeners will be removed

Type declaration

    • <TData>(type, listener?): void
    • Type Parameters

      • TData = unknown

      Parameters

      • type: string

        Event type

      • Optional listener: ((event) => void)

        Event listener

          • (event): void
          • Parameters

            Returns void

      Returns void

Throws

listener must be a function

on: (<TData, TType>(type, listener, thisArg?) => void)

Add new event listener

Type declaration

    • <TData, TType>(type, listener, thisArg?): void
    • Type Parameters

      • TData = unknown
      • TType extends string = string

      Parameters

      • type: TType

        Event type. If the event type is xAPI, the listener's event parameter will be of type XAPIEvent. Any dispatched XAPIEvent will trigger the xAPI event.

      • listener: EventListener<TData, TType>

        Event listener

      • Optional thisArg: ThisType<unknown>

        Optionally specify the listener's this value

      Returns void

Throws

listener must be a function

once: (<TData, TType>(type, listener, thisArg?) => void)

Add new event listener that will be fired only once

Type declaration

    • <TData, TType>(type, listener, thisArg?): void
    • Type Parameters

      • TData = unknown
      • TType extends string = string

      Parameters

      • type: TType

        Event type. If the event type is xAPI, the listener's event parameter will be of type XAPIEvent. Any dispatched XAPIEvent will trigger the xAPI event.

      • listener: EventListener<TData, TType>

        Event listener

      • Optional thisArg: ThisType<unknown>

        Optionally specify the listener's this value

      Returns void

Throws

listener must be a function

trigger: (<TData>(event, eventData?, extras?) => void)

Dispatch event

Type declaration

    • <TData>(event, eventData?, extras?): void
    • Type Parameters

      • TData = unknown

      Parameters

      • event: unknown

        Event object or event type as string

      • Optional eventData: TData

        Custom event data (used when event type as string is used as first argument)

      • Optional extras: {
            bubbles?: boolean;
            external?: boolean;
        }
        • Optional bubbles?: boolean
        • Optional external?: boolean

      Returns void

triggerXAPI: ((verb, extra) => void)

Type declaration

    • (verb, extra): void
    • Parameters

      Returns void

Methods

  • Returns HTMLElement

    The ConfirmationDialog HTML element

  • Returns HTMLElement

    The element that had focus before the ConfirmationDialog was opened

  • Parameters

    • minimumHeight: null | number

    Returns void