diff --git a/js/Emitter.js b/js/Emitter.js index ba68eb42..94d8db18 100644 --- a/js/Emitter.js +++ b/js/Emitter.js @@ -108,7 +108,7 @@ define( require => { } /** - * Adds a listener + * Adds a listener. When emitting, the listeners are called in the order they were added. * @param {function} listener * @public */ @@ -182,8 +182,8 @@ define( require => { } /** - * Emits a single event. - * This method is called many times in a simulation and must be well-optimized. + * Emits a single event. This method is called many times in a simulation and must be well-optimized. Listeners + * are notified in the order they were added via addListener. * @params - expected parameters are based on options.argumentTypes, see constructor * @public */ diff --git a/js/Property.js b/js/Property.js index ad899310..2205f88f 100644 --- a/js/Property.js +++ b/js/Property.js @@ -309,7 +309,8 @@ define( require => { /** * Adds listener and calls it immediately. If listener is already registered, this is a no-op. The initial - * notification provides the current value for newValue and null for oldValue. + * notification provides the current value for newValue and null for oldValue. On value changes, listeners + * are called back in the order they were added. * * @param {function} listener a function of the form listener(newValue,oldValue) * @public @@ -320,10 +321,9 @@ define( require => { } /** - * Add an listener to the Property, without calling it back right away. - * This is used when you need to register a listener without an immediate callback. - * - * @param {function} listener - a function with a single argument, which is the value of the property at the time the function is called. + * Add an listener to the Property, without calling it back right away. This is used when you need to register a + * listener without an immediate callback. On value changes, listeners are called back in the order they were added. + * @param {function} listener - a function with a single argument, which is the current value of the Property. * @public */ lazyLink( listener ) {