chromium/third_party/blink/web_tests/screen_orientation/resources/iframe-listen-orientation-change.html

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