I'm working (slowly) on a better script-powered drag interface for
iPhone but I just don't seem to have any time to spend on it lately.
Anyhow, the first step is to detect support for touch events to see if
touch listeners should be added (without using the UA string).  Here
here it is:

  var touchSupported = (function () {
    if (document && document.createEvent) {
      try {
         document.createEvent('TouchEvent');
         return true;
       } catch (e) {
         return false;
       }
     }
   })();

   alert(touchSupported);


It tests for support of Apple's proprietary (but consistent with W3C
recommendations) TouchEvent interface, hopefully other browsers that
support touch events will copy Apple's lead otherwise further tests
will be required.

Any comments will be gratefully received.


--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to