Skip to content
Advertisement

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

There is a cross-window iframe, which contains a link to index.php from another server, which, in turn, has a Yandex maps api script (see below). How to make sure that this script chain is fully loaded? I’m trying the following way:

JavaScript
The message arrives, but the map is not displayed. Which, in my opinion, means incomplete loading of scripts.

Chain of yandex map scripts

Advertisement

Answer

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

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement