This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Just to make the examples look a bit less amateurish, perhaps better to replace the various alert(...) statements in examples 1 and 2 with a comment and elipsis? In example 1: if(window.navigator.maxTouchPoints>1) alert("Your user agent and hardware support multi-touch!"); } change to if(window.navigator.maxTouchPoints>1) /* User agent and hardware support multi-touch */ } In example 2: switch(event.pointerType) { case "mouse": /* mouse input detected */ ... break; case "pen": /* pen/stylus input detected */ ... break; case "touch": /* touch input detected */ ... break; default: /* pointerType is empty (could not be detected) or UA-specific custom type */ ... }
Fixed as suggested: https://dvcs.w3.org/hg/pointerevents/rev/72268b279eb8