site/examples/todo/js/lib/canjs/can.jquery.js
function () {
                var info = getValueAndObserved(getterSetter, context),
                    newObserveSet = info.observed;

                var value = info.value;
                matched = !matched;

                // go through every attribute read by this observe
                can.each(newObserveSet, function (ob) {
                    // if the observe/attribute pair is being observed
                    if (observing[ob.obj._cid + "|" + ob.attr]) {
                        // mark at as observed
                        observing[ob.obj._cid + "|" + ob.attr].matched = matched;
                    } else {
                        // otherwise, set the observe/attribute on oldObserved, marking it as being observed
                        observing[ob.obj._cid + "|" + ob.attr] = {
                            matched: matched,
                            observe: ob
                        };
                        ob.obj.bind(ob.attr, onchanged);
                    }
                });

                // Iterate through oldObserved, looking for observe/attributes
                // that are no longer being bound and unbind them
                for (var name in observing) {
                    var ob = observing[name];
                    if (ob.matched !== matched) {
                        ob.observe.obj.unbind(ob.observe.attr, onchanged);
                        delete observing[name];
                    }
                }
                return value;
            }
function () {
                var info = getValueAndObserved(getterSetter, context),
                    newObserveSet = info.observed;

                var value = info.value;
                matched = !matched;

                // go through every attribute read by this observe
                can.each(newObserveSet, function (ob) {
                    // if the observe/attribute pair is being observed
                    if (observing[ob.obj._cid + "|" + ob.attr]) {
                        // mark at as observed
                        observing[ob.obj._cid + "|" + ob.attr].matched = matched;
                    } else {
                        // otherwise, set the observe/attribute on oldObserved, marking it as being observed
                        observing[ob.obj._cid + "|" + ob.attr] = {
                            matched: matched,
                            observe: ob
                        };
                        ob.obj.bind(ob.attr, onchanged);
                    }
                });

                // Iterate through oldObserved, looking for observe/attributes
                // that are no longer being bound and unbind them
                for (var name in observing) {
                    var ob = observing[name];
                    if (ob.matched !== matched) {
                        ob.observe.obj.unbind(ob.observe.attr, onchanged);
                        delete observing[name];
                    }
                }
                return value;
            }
function ( ) { var info = getValueAndObserved ( getterSetter , context ) , newObserveSet = info . observed ; var value = info . value ; matched = ! matched ; // go through every attribute read by this observe can . each ( newObserveSet , function ( ob ) { // if the observe/attribute pair is being observed if ( observing [ ob . obj . _cid + "|" + ob . attr ] ) { // mark at as observed observing [ ob . obj . _cid + "|" + ob . attr ] . matched = matched ; } else { // otherwise, set the observe/attribute on oldObserved, marking it as being observed observing [ ob . obj . _cid + "|" + ob . attr ] = { matched : matched , observe : ob } ; ob . obj . bind ( ob . attr , onchanged ) ; } } ) ; // Iterate through oldObserved, looking for observe/attributes // that are no longer being bound and unbind them for ( var name in observing ) { var ob = observing [ name ] ; if ( ob . matched !== matched ) { ob . observe . obj . unbind ( ob . observe . attr , onchanged ) ; delete observing [ name ] ; } } return value ; }
gets the value returned by `getterSetter` and also binds to any attributes read by the call
gets the value returned by getterSetter and also binds to any attributes read by the call