Skip to content

Instantly share code, notes, and snippets.

@webdesignberlin
Forked from simevidas/gist:70caf9e7196dbb6f07c2
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdesignberlin/178b5e32a8a681588961 to your computer and use it in GitHub Desktop.
Save webdesignberlin/178b5e32a8a681588961 to your computer and use it in GitHub Desktop.
// Old API
screen.orientation
.lockOrientation( orientations )
.unlockOrientation()
screen.addEventListener('orientationchange', handler)
// New API
screen.orientation.type
.angle
.onchange
.lock( lockType ) // returns Promise
.unlock()
screen.orientation.addEventListener('change', handler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment