Device & Sensors
Screen Orientation API
Read current screen orientation state (portrait/landscape) and lock orientation.
Checking support...
Feature Not SupportedThis browser does not support the Screen Orientation API Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after processing...
Native JavaScript Code Example (Zero Libraries)
console.log(screen.orientation.type, screen.orientation.angle);
About the Screen Orientation API Web API
Screen Orientation API reads orientation type and locks screen layout.
Specification:W3C & WHATWG Web API Standard
Sponsored Content