Github user daserge commented on a diff in the pull request: https://github.com/apache/cordova-docs/pull/690#discussion_r109208194 --- Diff: www/_posts/2017-03-30-screen-orientation-plugin.md --- @@ -0,0 +1,70 @@ +--- +layout: post +author: + name: Vishal Mishra + url: https://twitter.com/tweetsbymishra +title: "Screen Orientation Plugin" +categories: news +tags: cordova screen orientation +--- +Originally posted at this [PhoneGap blog](https://blog.phonegap.com/cordova-screen-orientation-plugin-fabeba30a4c4) + +## Cordova Screen Orientation Plugin + +The new version(2.0.0) of the cordova screen orientation plugin was released recently. The purpose of the plugin is to set/lock the screen orientation in a common way for all the major platforms. This new version conforms with the specifications mentioned in the [W3C Screen Orientation API](https://www.w3.org/TR/screen-orientation/), currently in open draft. + +The plugin incorporates these major updates: + +1. Locking/unlocking the screen orientation. +2. Accessing the current screen orientation. +3. Addition of âonchangeâ event handler to the screen.orientation object. +4. A Demo App. + +### Locking/unlocking the screen orientation + +The screen orientation can be locked to a particular orientation, say, for example, landscape, using : + +```js +screen.orientation.lock(âlandscapeâ).then(function success() { --- End diff -- `âlandscapeâ` does it make sense to replace it to standard quote chars? `'landscape'`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org