initTouchEvent() in WebKit doesn't match Touch Events version 2 W3C Editor's Draft 14 November 2011

Hi£¬

         Would you pls help me to have a look at the following problem,
when implementing the function initTouchEvent()(see the following codes)
with references to "Touch Events version 2  W3C Editor's Draft 14 November
2011"  (http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html),

var touch = document.createTouch(document.body);

var touches = document.createTouchList();

touches[0] = touch;

var event = document.createEvent("TouchEvent");

event.initTouchEvent(touches, touches, touches, "touchstart",  window, 1,
2, 3, 4, false, false, false, false);

        alert(event.touches);

however, it doesn¡¯t work, the attribute ¡°touches¡± seems not to be assigned
a value, and the value of event.touches is still NULL, it¡¯s so wired, why?

Received on Friday, 1 June 2012 09:23:30 UTC