Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var t1 =
  2. [ '#demo',
  3.   [ 'h1#logo', 'Static Example', { style: 'color:blue' } ],
  4.   [ 'p', 'some example text' ],
  5.   [ 'ul#list.bullets',
  6.     [ 'li', 'item1' ],
  7.     [ 'li.active', 'item2' ],
  8.     [ 'li', [Object] ] ] ]
  9.  
  10. //-------------------
  11.  
  12. var t2 =
  13. [ '#demo',
  14.   [ 'h1#logo', 'Static Example', { style: 'color:red' } ],
  15.   [ 'p', 'some example text' ],
  16.   [ 'ul#list.bullets',
  17.     [ 'li', 'item1' ],
  18.     [ 'li.active', 'item3' ],
  19.     [ 'li', [Object] ],
  20.     [ 'li', [Object] ] ] ]
  21.  
  22. //-------------------
  23.  
  24. var patch =
  25. [ { kind: 'E',
  26.     path: [ 1, 2, 'style' ],
  27.     lhs: 'color:blue',
  28.     rhs: 'color:red' },
  29.   { kind: 'E', path: [ 3, 2, 1 ], lhs: 'item2', rhs: 'item3' },
  30.   { kind: 'E',
  31.     path: [ 3, 3, 1, 2, 'href' ],
  32.     lhs: '#',
  33.     rhs: '#asdf' },
  34.   { kind: 'A',
  35.     path: [ 3 ],
  36.     index: 4,
  37.     item: { kind: 'N', rhs: [Object] } } ]
  38.  
  39. //-------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement