Package Exports
- generate-js-bindings
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (generate-js-bindings) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Table of Contents
- Bindable
Bindable
A generator for Bindable, lets you create an objects that you can bind functions to property changes, or generate a new generator that inherits from Bindable.
Install:
$ npm install generate-js-bindings
Bindable.create()
- return:
ObjectA new object that inherits from Bindable.
Creates a new object that inherits from Bindable.
Bindable.generate(create)
- create
FunctionCreate method that gets called when creating a new object that inherits from Bindable. - return:
GeneratorA new generator that inherits from Bindable.
Returns a new generator that inherits from Bindable.
Class: Generation
A new generator that inherits from the generator that generated it using the Bindable.generate(create) method.
Class: Creation
A new object that inherits from the generator that created it using the Bindable.create() method.
Creation.bind(property, listener[, observer])
- property
StringName of property. - listener
FunctionProperty change handler function. - observer
ObjectObject reference for binding. - return:
ObjectThis object.
Adds a 'listener' on 'property' change to this Bindable instance.
Creation.bindOnce(property, listener[, observer])
property
StringName of property.listener
FunctionProperty change handler function.observer
ObjectObject reference for binding.return:
ObjectThis object.
Adds a 'listener' on 'property' change to this Bindable instance which is removed after one 'property' change.
Creation.unbind([property][, listener][, observer])
- property
StringName of property. - listener
FunctionProperty change handler function. - observer
ObjectObject reference for binding. - return:
ObjectThis object.
Removes a 'listener' on 'property', or all listeners on 'property', or all listeners from this Bindable instance.
Creation.change(property, oldValue, newValue, changer)
- property
StringName of property. - oldValue
AnyOld value of property. - newValue
AnyNew value of property. - return:
ObjectThis object.
Emits an 'property' with 'args' on this Bindable instance.