1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!DOCTYPE HTML> <html> <head> </head> <script> screen.orientation.lock('landscape').then(function() { document.location.hash = screen.orientation.search("landscape") == 0 ? "#Pass" : "#Fail"; }, function(e) { document.location.hash = "#" + e.name; }); </script> <body> <div>Starting...</div> </body> </html>