Odo Device
Device-specific settings and helpers.
Install
npm install @odopod/odo-device --save
Quick Start
import
or require
the package, then use its properties and methods.
import OdoDevice from '@odopod/odo-device';
console.log('Has touch events:', OdoDevice.HAS_TOUCH_EVENTS);
console.log('Touch action:', OdoDevice.prefixed('touchAction', 'pan-y'));
console.log('Has local storage:', OdoDevice.HAS_LOCAL_STORAGE);
Visit the Odo component directory for demos, code examples, and documentation.
Device [1.3.0] - 2018-6-7
Added
- Test for
passive
property in event listener options. Use OdoDevice.HAS_PASSIVE_LISTENERS
to check if you can use the third argument of addEventListener
as an object. Needed for newer versions of iOS and Chrome which make touchstart
and touchmove
events on the document passive by default.