⌈⌋ ⎇ branch:  Bitrhythm


Hex Artifact Content

Artifact 7c72a0b765ffc8bd6984c1564f33bed05e069442d07a3f21af3674d6715b5740:


0000: 0a 3c 74 6f 75 63 68 2d 65 76 65 6e 74 73 3e 0a  .<touch-events>.
0010: 0a 20 20 3c 64 69 76 20 6f 6e 74 6f 75 63 68 73  .  <div ontouchs
0020: 74 61 72 74 3d 7b 20 66 6e 20 7d 20 6f 6e 74 6f  tart={ fn } onto
0030: 75 63 68 6d 6f 76 65 3d 7b 20 66 6e 20 7d 20 6f  uchmove={ fn } o
0040: 6e 74 6f 75 63 68 65 6e 64 3d 7b c2 a0 66 6e 20  ntouchend={..fn 
0050: 7d 3e 0a 20 20 20 20 3c 68 33 3e 54 6f 75 63 68  }>.    <h3>Touch
0060: 20 6d 65 2c 20 74 6f 75 63 68 20 6d 65 2e 3c 2f   me, touch me.</
0070: 68 33 3e 0a 20 20 3c 2f 64 69 76 3e 0a 0a 20 20  h3>.  </div>..  
0080: 3c 64 69 76 20 69 64 3d 22 69 6e 66 6f 22 20 6f  <div id="info" o
0090: 6e 63 6c 69 63 6b 3d 7b 20 63 6c 65 61 72 20 7d  nclick={ clear }
00a0: 3e 3c 2f 64 69 76 3e 0a 0a 20 20 66 6e 28 65 29  ></div>..  fn(e)
00b0: 20 7b 0a 20 20 20 20 74 68 69 73 2e 69 6e 66 6f   {.    this.info
00c0: 2e 69 6e 6e 65 72 48 54 4d 4c 20 2b 3d 20 65 2e  .innerHTML += e.
00d0: 74 79 70 65 20 2b 20 27 3c 62 72 3e 27 0a 20 20  type + '<br>'.  
00e0: 7d 0a 0a 20 20 63 6c 65 61 72 28 29 20 7b 0a 20  }..  clear() {. 
00f0: 20 20 20 74 68 69 73 2e 69 6e 66 6f 2e 69 6e 6e     this.info.inn
0100: 65 72 48 54 4d 4c 20 3d 20 27 27 0a 20 20 7d 0a  erHTML = ''.  }.
0110: 0a 3c 2f 74 6f 75 63 68 2d 65 76 65 6e 74 73 3e  .</touch-events>