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

Re: Proposal to specify behavior for terminals without touch hardware

From: Matt Brubeck <mbrubeck@mozilla.com>
Date: Fri, 13 May 2011 10:14:58 -0700
Message-ID: <4DCD6712.5060802@mozilla.com>
To: Gregers Gram Rygg <gregersrygg@gmail.com>
CC: public-webevents@w3.org
> When the terminal does not have touch hardware:
> - The touch event properties (ontouchstart, ontouchmove, etc.) MUST
> NOT be exposed on Element, Window nor Document.
> - document.createEvent("TouchEvent") MUST throw an Error.
> Developers are using this to detect if a terminal has support for
> touch hardware.

Currently it's possible (at least in Gecko 6.0a1, and I think in some 
other browsers) to use createEvent to write automated tests for touch 
event handlers, and run those tests on non-touch hardware.  This can be 
beneficial for testing, because automating tests on mobile hardware is 
often slower or more difficult than automating them on desktop.

I agree that feature detection for touch event support is important, and 
it might be worth giving up some testing capabilities.  I just want to 
make sure we're aware of this potential trade-off.
Received on Friday, 13 May 2011 17:15:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:53 UTC