Optional
options: ViewOptions<WidgetModel, HTMLElement> & { Optional
classA promise that resolves to the parent view when a child view is displayed.
Optional
idStatic
class_Use luminoWidget instead (Since 8.0).
Protected
_createProtected
_ensureOptional
context: anyOptional
context: anyCreate 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).
Optional
events: _Result<EventsHash>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 =
Optional
eventName: null | stringOptional
callback: null | EventHandlerOptional
context: anyOptional
context: anyOptional
context: anyOptional
context: anyOptional
context: anyOptional
object: anyOptional
events: stringOptional
callback: EventHandlerRest
...args: any[]Optional
eventName: stringOptional
callback: EventHandlerOptional
context: anyOptional
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.