@superherocheesecake/orientation-observer
v2.0.7
Published
Observes the page orientation (landscape / portrait)
Downloads
8
Maintainers
Keywords
Readme
OrientationObserver
Observes the page orientation (landscape / portrait)
// npm installation
npm i --save @superherocheesecake/orientation-observer
// require the module
import { orientationObserver } from '@superherocheesecake/orientation-observer';
// listen for changes
orientationObserver.addEventListener('update', this._orientationObserverUpdateHandler);
_orientationObserverUpdateHandler(options) {
// options.orientation
}
// or just fetch it
const orientation = OrientationObserver.getOrientation();