chromium/third_party/blink/web_tests/screen_orientation/resources/iframe-listen-window-orientationchange.html

<!DOCTYPE html>
<script>
    window.addEventListener('orientationchange', function(event) {
        parent.window.postMessage(window.orientation, "*");
    });
    window.onorientationchange = function(event) {
        parent.window.postMessage(window.orientation, "*");
    };
</script>