Guest User

Untitled

a guest
Feb 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. "Support observing non-content properties": function () {
  2. this.c.fireCount = 0;
  3. this.c.nonContentObserver = function () {
  4. this.set('fireCount', this.get('fireCount') + 1);
  5. }.observes('nonContentProp');
  6.  
  7. // Fire the observer with the first set.
  8. this.c.set('content', SC.Object.create());
  9. this.c.set('nonContentProp', 'test');
  10. this.c.get('fireCount').shouldEqual(1);
  11.  
  12. delete this.c.fireCount;
  13. delete this.c.nonContentProp;
  14. delete this.c.nonContentObserver;
  15. }
Add Comment
Please, Sign In to add comment