Hierarchy

Constructors

Properties

$el: JQuery<HTMLElement>
attributes: Record<string, any>
cid: string
className?: string
collection: Collection<any>
displayed: Promise<WidgetView>

A promise that resolves to the parent view when a child view is displayed.

el: HTMLElement
id?: string
options: any
tagName: string

Methods

  • Parameters

    • selector: string

    Returns JQuery<HTMLElement>

  • Parameters

    • tagName: string

    Returns void

  • Returns void

  • Parameters

    • eventName: string
    • callback: EventHandler
    • Optional context: any

    Returns WidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns WidgetView

  • Make an event delegation handler for the given eventName and selector and attach it to this.el. If selector is empty, the listener will be bound to this.el. If not, a new handler that will recursively traverse up the event target's DOM hierarchy looking for a node that matches the selector. If one is found, the event's delegateTarget property is set to it and the return the result of calling bound listener with the parameters given to the handler.

    This does not properly handle selectors for things like focus and blur (see https://github.com/jquery/jquery/blob/7d21f02b9ec9f655583e898350badf89165ed4d5/src/event.js#L442 for some similar exceptional cases).

    Parameters

    • eventName: string
    • listener: Function

    Returns WidgetView

  • Parameters

    • eventName: string
    • selector: string
    • listener: Function

    Returns WidgetView

  • Parameters

    • Optional events: _Result<EventsHash>

    Returns WidgetView

  • Events hash or a method returning the events hash that maps events/selectors to methods on your View. For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; That works only if you set it in the constructor or the initialize method.

    Returns EventsHash

  • Handle message sent to the front end.

    Used to focus or blur the widget.

    Parameters

    • content: any

    Returns void

  • Parameters

    • object: any
    • events: string
    • callback: EventHandler

    Returns WidgetView

  • Parameters

    • object: any
    • eventMap: EventMap

    Returns WidgetView

  • Parameters

    • object: any
    • events: string
    • callback: EventHandler

    Returns WidgetView

  • Parameters

    • object: any
    • eventMap: EventMap

    Returns WidgetView

  • Parameters

    • Optional eventName: null | string
    • Optional callback: null | EventHandler
    • Optional context: any

    Returns WidgetView

  • Parameters

    • eventName: string
    • callback: EventHandler
    • Optional context: any

    Returns WidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns WidgetView

  • Parameters

    • events: string
    • callback: EventHandler
    • Optional context: any

    Returns WidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns WidgetView

  • For use with views as ES classes. If you define a preinitialize method, it will be invoked when the view is first created, before any instantiation logic is run.

    See

    https://backbonejs.org/#View-preinitialize

    Parameters

    • Optional options: ViewOptions<WidgetModel, HTMLElement>

    Returns void

  • Send a custom msg associated with this view.

    Parameters

    • content: {}
      • Optional buffers: ArrayBuffer[] | ArrayBufferView[]

      Returns void

    • Parameters

      • element: HTMLElement | JQuery<HTMLElement>

      Returns WidgetView

    • Parameters

      • Optional object: any
      • Optional events: string
      • Optional callback: EventHandler

      Returns WidgetView

    • Parameters

      • eventName: string
      • Rest ...args: any[]

      Returns WidgetView

    • Parameters

      • Optional eventName: string
      • Optional callback: EventHandler
      • Optional context: any

      Returns WidgetView

    • Triggered on model change.

      Update view to be consistent with this.model

      Parameters

      • Optional options: any

      Returns void

    • Do not use, prefer TypeScript's extend functionality.

      Parameters

      • properties: any
      • Optional classProperties: any

      Returns any

    Generated using TypeDoc