Home Reference Source Repository
import {ES6ExampleView} from 'es6-widget-example/es6/ES6ExampleView.es6'
public class | source

ES6ExampleView

Extends:

nbextensions/widgets/widgets/js/widget~DOMWidgetView → ES6ExampleView

A widget to test out using ES6 classes with Backbone

Method Summary

Public Methods
public
public
public

render()

Called when view is rendered, but not yet added to DOM.

public
public

update()

Update the contents of this view

public

update_button_style(previous_trait_value: *)

Public Methods

public className(): String source

Return:

String

the classes to apply to the element

public events(): object source

Return:

object

DOM events and names of handler methods.

public render() source

Called when view is rendered, but not yet added to DOM.

public tagName(): String source

Return:

String

the name of the tag to create (not <div/>)

public update() source

Update the contents of this view

Called when the model is changed. The model may have been changed by another view or by a state update from the back-end.

public update_button_style(previous_trait_value: *) source

Set the Bootstrap btn- semantic class.

Params:

NameTypeAttributeDescription
previous_trait_value *