Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DebugContext

Maintains a map of [[DebugOption]]s. You can add listeners to debug options by passing their names.

Hierarchy

  • DebugContext

Index

Constructors

constructor

Accessors

options

  • get options(): Map<string, any>

Methods

addEventListener

  • addEventListener(name: string, listener: (event: Event) => void): void
  • Adds a listener to a debug option.

    Parameters

    • name: string

      Name of the option that requires a listener.

    • listener: (event: Event) => void

      The listener function to add.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

clear

  • clear(): void

getValue

  • getValue(name: string): any

hasEventListener

  • hasEventListener(name: string, listener: (event: Event) => void): boolean
  • Checks for a listener in a debug option.

    Parameters

    • name: string

      Name of the option to check for.

    • listener: (event: Event) => void

      The listener function to check for.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns boolean

hasOption

  • hasOption(name: string): boolean

removeEventListener

  • removeEventListener(name: string, listener: (event: Event) => void): void
  • Removes a listener from a debug option.

    Parameters

    • name: string

      Name of the option from which to remove a listener.

    • listener: (event: Event) => void

      The listener function to remove.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

setValue

  • setValue(name: string, value: any): void
  • Sets the value of an option. Calls change listeners of that option, even if the value has not been changed. The change listeners provided here are not called during this set operation.

    Parameters

    • name: string

      Name of the option.

    • value: any

      Value of the option.

    Returns void

Generated using TypeDoc