---
title: orientation
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/domwindow/1632568-orientation
---

# orientation

Specifies the orientation of the device.

## Declaration

```data
readonly attribute long orientation;
```

## Discussion

Discussion This property is set to one of the values in Table 1. For example, if the user starts with the device in portrait orientation and then changes to landscape orientation by turning the device to the right, the window’s orientation property is set to -90. If the user instead changes to landscape by turning the device to the left, the window’s orientation property is set to 90. The default value is 0.  |   |   |   |   |

## See Also

### Getting Orientation and Motion Events

- [ondevicemotion](webkitjs/domwindow/1632048-ondevicemotion.md)
- [ondeviceorientation](webkitjs/domwindow/1628872-ondeviceorientation.md)
