I'm trying to connect the Yandex maps API to the head:
<!DOCTYPE html> <html lang="en"> <head> <title>site</title> <meta charset="UTF-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/postscribe/2.0.8/postscribe.min.js"> <script async src="https://api-maps.yandex.ru/1.1/index.xml" type="text/javascript"></script> <script type="text/javascript"> window.onload = function () { var map = new YMaps.Map(document.getElementById("YMapsID")); map.setCenter(new YMaps.GeoPoint(59.938518, 30.323342), 10); }; </script> </head> body:
<body> <div class="map-block_map-item"> <div id="YMapsID" style="width:100%;height:100%"> </div> </div> </body> But when loading, an error occurs:
"It is not possible to explicitly write external script unless it is explicitly opened."
If you remove the attribute of asynchronous script loading, then the following error occurs:
A parser-blocking, cross site (ie different eTLD + 1) script, https://api-maps.yandex.ru/1.1/_YMaps.js?v=1.1.21-58 , is invoked via document.write. Download this page. If this is the next console message. See https://www.chromestatus.com/feature/5718547946799104 for more details
Tell me how best to solve this problem?