Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs: Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Sep 19, 2017
1 parent a465198 commit dca8f8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/observablemixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,14 @@ extend( ObservableMixin, EmitterMixin );
/**
* Fired when an attribute changed value.
*
* observable.set( 'prop', 1 );
*
* observable.on( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {
* console.log( `${ propertyName } has changed from ${ oldValue } to ${ newValue }` );
* } )
*
* observable.prop = 2; // -> 'prop has changed from 1 to 2'
*
* @event module:utils/observablemixin~ObservableMixin#change:{attribute}
* @param {String} name The attribute name.
* @param {*} value The new attribute value.
Expand Down

0 comments on commit dca8f8f

Please sign in to comment.