Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A comparison of the new vs old Screen Orientation API
// Old API
.lockOrientation( orientations )
screen.addEventListener('orientationchange', handler)
// New API
.lock( lockType ) // returns Promise
screen.orientation.addEventListener('change', handler)

This comment has been minimized.

Copy link
Owner Author

simevidas commented Oct 24, 2014

Old API (February 2014 draft):
New API (October 2014 draft):

The new API has already been implemented and enabled by default in Chrome and Opera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.