无法在角应用中呈现诺顿安全图像

时间:2015-11-10 00:04:46

标签: javascript jquery angularjs android-lazyloading

通过部分html文件添加对norton安全徽标JS文件(下面复制)的引用时,收到以下错误:

Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened

我没有使用延迟加载库或角度更改,而是使用JQuery文档就绪调用来加载JS文件,但我没有遇到所需的行为,即Norton徽标没有加载。

<div id="sslLogo"></div>
<script type="text/javascript"> 

function loadLogo(sslLogoContainer) {
 "use strict";

  var sslLogoScript = document.createElement('script');
  sslLogoScript.type = 'text/javascript';
  sslLogoScript.src = 'https://seal.websecurity.norton.com/getseal?host_name=www.test.com&amp;size=L&amp;use_flash=NO&amp;use_transparent=NO&amp;lang=en';
  sslLogoContainer.appendChild(sslLogoScript);

}

$(document).ready(function () {
var sslLogoContainer = document.getElementById("sslLogo");
loadLogo(sslLogoContainer);
});

/*
window.onload = {
var sslLogoContainer = document.getElementById("sslLogo");
loadLogo();
}*/
</script> 

有关如何解决问题的任何想法?我修改了用于stackoverflow的norton url。

0 个答案:

没有答案