Lines Matching refs:thingy
575 Thingy.observe = function(thingy, callback) { argument
576 Object.observe(thingy, callback, [Thingy.INCREMENT,
582 Thingy.unobserve = function(thingy, callback) { argument
583 Object.unobserve(thingy);
586 var thingy = new Thingy(2, 4); variable
588 Object.observe(thingy, observer.callback);
589 Thingy.observe(thingy, observer2.callback);
590 thingy.increment(3); // { a: 5, b: 7 }
591 thingy.b++; // { a: 5, b: 8 }
592 thingy.multiply(2); // { a: 10, b: 16 }
593 thingy.a++; // { a: 11, b: 16 }
594 thingy.incrementAndMultiply(2, 2); // { a: 26, b: 36 }
599 { object: thingy, type: 'update', name: 'a', oldValue: 2 },
600 { object: thingy, type: 'update', name: 'b', oldValue: 4 },
601 { object: thingy, type: 'update', name: 'b', oldValue: 7 },
602 { object: thingy, type: 'update', name: 'a', oldValue: 5 },
603 { object: thingy, type: 'update', name: 'b', oldValue: 8 },
604 { object: thingy, type: 'update', name: 'a', oldValue: 10 },
605 { object: thingy, type: 'update', name: 'a', oldValue: 11 },
606 { object: thingy, type: 'update', name: 'b', oldValue: 16 },
607 { object: thingy, type: 'update', name: 'a', oldValue: 13 },
608 { object: thingy, type: 'update', name: 'b', oldValue: 18 },
611 { object: thingy, type: Thingy.INCREMENT, incremented: 3 },
612 { object: thingy, type: 'update', name: 'b', oldValue: 7 },
613 { object: thingy, type: Thingy.MULTIPLY, multiplied: 2 },
614 { object: thingy, type: 'update', name: 'a', oldValue: 10 },
616 object: thingy,
713 RecursiveThingy.observe = function(thingy, callback) { argument
714 Object.observe(thingy, callback, [RecursiveThingy.MULTIPLY_FIRST_N]);
717 RecursiveThingy.unobserve = function(thingy, callback) { argument
718 Object.unobserve(thingy);
721 var thingy = new RecursiveThingy; variable
722 thingy.push(1, 2, 3, 4);
724 Object.observe(thingy, observer.callback);
725 RecursiveThingy.observe(thingy, observer2.callback);
726 thingy.multiplyFirstN(2, 3); // [2, 4, 6, 4]
731 { object: thingy, type: 'update', name: '2', oldValue: 3 },
732 { object: thingy, type: 'update', name: '1', oldValue: 2 },
733 { object: thingy, type: 'update', name: '0', oldValue: 1 }
736 { object: thingy, type: RecursiveThingy.MULTIPLY_FIRST_N, multiplied: 2, n: 3 }
771 DeckSuit.observe = function(thingy, callback) { argument
772 Object.observe(thingy, callback, [DeckSuit.SHUFFLE]);
775 DeckSuit.unobserve = function(thingy, callback) { argument
776 Object.unobserve(thingy);