Re: Proposal to specify behavior for terminals without touch hardware

On 05/13/2011 08:14 PM, Matt Brubeck wrote:
>> 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.

...if you enable a preference.

> 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:58:48 UTC