can-bind.js
function turnOnListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {
	var onValueOrOnEmitFn;

	// Use either onValue or onEmit depending on which Symbols are on the `observable`
	if (listenToObservable[onValueSymbol]) {
		onValueOrOnEmitFn = canReflect.onValue;
	} else if (listenToObservable[onEmitSymbol]) {
		onValueOrOnEmitFn = onEmit;
	}

	if (onValueOrOnEmitFn) {
		onValueOrOnEmitFn(listenToObservable, updateFunction, queue);

		//!steal-remove-start
		if(process.env.NODE_ENV !== 'production') {

			// The updateObservable is mutated by listenToObservable
			canReflectDeps.addMutatedBy(updateObservable, listenToObservable);

			// The updateFunction mutates updateObservable
			updateFunction[getChangesSymbol] = function getChangesDependencyRecord() {
				var s = new Set();
				s.add(updateObservable);
				return {
					valueDependencies: s
				};
			};

		}

		//!steal-remove-end
	}
}
function turnOnListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {
	var onValueOrOnEmitFn;

	// Use either onValue or onEmit depending on which Symbols are on the `observable`
	if (listenToObservable[onValueSymbol]) {
		onValueOrOnEmitFn = canReflect.onValue;
	} else if (listenToObservable[onEmitSymbol]) {
		onValueOrOnEmitFn = onEmit;
	}

	if (onValueOrOnEmitFn) {
		onValueOrOnEmitFn(listenToObservable, updateFunction, queue);

		//!steal-remove-start
		if(process.env.NODE_ENV !== 'production') {

			// The updateObservable is mutated by listenToObservable
			canReflectDeps.addMutatedBy(updateObservable, listenToObservable);

			// The updateFunction mutates updateObservable
			updateFunction[getChangesSymbol] = function getChangesDependencyRecord() {
				var s = new Set();
				s.add(updateObservable);
				return {
					valueDependencies: s
				};
			};

		}

		//!steal-remove-end
	}
}
function turnOnListeningAndUpdate ( listenToObservable , updateObservable , updateFunction , queue ) { var onValueOrOnEmitFn ; // Use either onValue or onEmit depending on which Symbols are on the `observable` if ( listenToObservable [ onValueSymbol ] ) { onValueOrOnEmitFn = canReflect . onValue ; } else if ( listenToObservable [ onEmitSymbol ] ) { onValueOrOnEmitFn = onEmit ; } if ( onValueOrOnEmitFn ) { onValueOrOnEmitFn ( listenToObservable , updateFunction , queue ) ; //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { // The updateObservable is mutated by listenToObservable canReflectDeps . addMutatedBy ( updateObservable , listenToObservable ) ; // The updateFunction mutates updateObservable updateFunction [ getChangesSymbol ] = function getChangesDependencyRecord ( ) { var s = new Set ( ) ; s . add ( updateObservable ) ; return { valueDependencies : s } ; } ; } //!steal-remove-end } }
Given an observable, start listening to it and set up the mutation dependencies
Given an observable start listening to it and set up the mutation dependencies