如何通知parent window中的iframe yandex map的所有脚本已经加载完毕?

How to notify iframe in the parent window that all the scripts of yandex map has been loaded?

有一个跨window iframe,其中包含来自另一台服务器的link到index.php,而后者又具有Yandex映射api脚本(见下文)。如何确保此脚本链已完全加载?我正在尝试以下方式:

 <script>
            function loaded() {
                window.parent.postMessage('loaded', '*');
            }
        </script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
        <script src="https://api-maps.yandex.ru/2.1/?apikey=bla-bla-bla&lang=ru_RU" type="text/javascript" onload="loaded()"></script>
消息到达,但未显示地图。在我看来,这意味着脚本加载不完整。

Chain of yandex map scripts

订阅 ymaps.ready()https://tech.yandex.com/maps/jsapi/doc/2.1/ref/reference/ready-docpage/

ymaps.ready(() => notify())