@superherocheesecake/orientation-observer

2.0.7 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @superherocheesecake/orientation-observer

Weekly Downloads

0

Version

2.0.7

License

none

Unpacked Size

12.6 kB

Total Files

12

Last publish

Collaborators

  • n0cha
  • edwardmediamonks
  • wesleysmulders
  • ksawery.mediamonks
  • vandenhork25
  • johanholwerda
  • renedrie
  • kristemmerman123
  • odin.schwartz
  • bolex222
  • coco_g
  • frontend_shcc
  • carinashcc
  • lukasfeitsma
  • jameswhite
  • raul.roman
  • jaak.kivinukk