1.0.1 • Published 7 years ago
mobile-device-orientation v1.0.1
device-orientation
monitor mobile devices orientation
usage
<script src="./dist/device-orientation.js"></script>
<script>
const deviceOrientation = new DeviceOrientation
deviceOrientation.onChange = function (orientation) {
console.log('orientation', orientation) // landscape or portrait
}
</script>