W3C home > Mailing lists > Public > public-webevents@w3.org > April to June 2012

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

From: ╠´└÷└÷ <tianlili3283@gmail.com>
Date: Thu, 31 May 2012 23:33:34 +0800
Message-ID: <CAF5znL-5oQY+DqxLcjsXA=O=JxTN3iXAaWDQtWGLM8RsMtK0_Q@mail.gmail.com>
To: public-webevents@w3.org
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:09:34 UTC