1 2 3 4 5 6
<!DOCTYPE html> <script> window.screen.orientation.addEventListener('change', function() { parent.window.postMessage(screen.orientation.type, "*"); }); </script>