Optional classA promise that resolves to the parent view when a child view is displayed.
Optional idUse luminoWidget instead (Since 8.0).
Protected _createProtected _ensureCreate and promise that resolves to a child view of a given model
Optional options: anyOptional options: anyMake 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).
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 =
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.
Optional options: ViewOptions<WidgetModel, HTMLElement>Optional selector: stringOptional listener: FunctionOptional listener: FunctionUpdate the DOM classes applied to the widget based on a single trait's value.
Given a trait value classes map, this function automatically handles applying the appropriate classes to the widget element and removing classes that are no longer valid.
class_map: dictionary Dictionary of trait values to class lists. Example: { success: ['alert', 'alert-success'], info: ['alert', 'alert-info'], warning: ['alert', 'alert-warning'], danger: ['alert', 'alert-danger'] }; trait_name: string Name of the trait to check the value of. el: optional DOM element handle, defaults to this.el Element that the classes are applied to.
Optional el: HTMLElementStatic extendGenerated using TypeDoc
Public constructor.