百度地图引用时 报出A Parser-blocking, cross site (i.e. different eTLD+1) script

页面引入百度地图api时

chrome控制台报出问题
A Parser-blocking, cross site (i.e. different eTLD+1) script, http://api.map.baidu.com/getscript?v=2.0&ak=Kpjp7jddqVUhWK5VkrfNt3YNezY88NtR&services=&t=20170517145936, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ api:1

查了一些资料,大概意思是说 :页面渲染完成后使用了document.write()
这是不被允许的,
根据上面的提示,把api引用url改成了

http://api.map.baidu.com/getscript?v=2.0&ak=Kpjp7jddqVUhWK5VkrfNt3YNezY88NtR&services=&t=20170517145936
1
错误便消失了
————————————————
版权声明:本文为CSDN博主「DegoLee」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/b809220024/article/details/72565978

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,499评论 0 10
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,942评论 0 0
  • 原文地址 nginx (pronounced "engine x") is a free open source ...
    kim4apple阅读 533评论 0 1
  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie阅读 2,976评论 0 3
  • Misunderstand Beggar Collateral Love 揭穿 舍不得 Black White A...
    宝藏女孩纸阅读 127评论 0 1