Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 <!DOCTYPE html>
3 <meta charset=utf-8 />
4 <title>test</title>
7 <style>
8 div {
9 border:1px solid red;
10 width: 100px; height: 100px;
11 }
12 </style>
14 <div></div>
16 <script>
17 var div = document.querySelector("div");
18 var initX, initY;
21 div.addEventListener("touchstart", function(evt) {
22 var touch = evt.changedTouches[0];
23 initX = touch.pageX;
24 initY = touch.pageY;
25 }, true);
27 div.addEventListener("touchmove", function(evt) {
28 var touch = evt.changedTouches[0];
29 var deltaX = touch.pageX - initX;
30 var deltaY = touch.pageY - initY;
31 div.style.transform = "translate(" + deltaX + "px, " + deltaY + "px)";
32 }, true);
34 div.addEventListener("touchend", function(evt) {
35 div.style.transform = "none";
36 }, true);
37 </script>