Modernizr.touch changes, as per #548:
I've done the PointerEvents test by checking for presence of the pointerdown event. Microsoft's recommendation is to use window.navigator.pointerEnabled (prefixed), but it isn't clear if pointerEnabled is intended to change dynamically as devices are connected/disconnected... anyone know? We agreed on #548 that Modernizr should focus on static capability to support pointer events, not dynamic state of whether or not an appropriate device is connected.
Moved Modernizr.touch -> Modernizr.touchevents (kept an alias though)
Moved Modernizr.pointerevents -> Modernizr.csspointer events (API bre…
Added DOM PointerEvents test as Modernizr.pointerevents
Most of the changes in modulizr are thanks to Sublime trimming trailing whitespace...
This looks good to me. I think the modulizr folder can pretty much go away in this new world, if I'm remembering correctly. Ashamed that I didn't have auto-whitespace removal when I wrote that file.
I think navigator.pointerEnabled would be just fine as the device should always have at least one input.
Touch screen via a KVM which hasn't been switched over?
And for the sake of future-proofing, who knows what people will come up with in the future... we thought they'd always have a mouse.
(I'm aware I'm probably being overly cautious...)
fair enough it's not overly complicated test and like you said it's more robust than just checking pointerEnabled.
Of course keyboard-only is perfectly valid too!