Javascript 在Adobe edge中加载时重新加载iFrame

Javascript 在Adobe edge中加载时重新加载iFrame,javascript,jquery,iframe,adobe-edge,Javascript,Jquery,Iframe,Adobe Edge,我正在使用AdobeEdge构建一个网站,我有几个iFrame可以在index.html页面上加载其他html页面。所有文件都在同一个域中 不知道为什么,但一些iframes内容在firefox中无法正确加载。但是当我刷新iframe时,它会完美地加载,因此我需要iframe在加载时自动重新加载(仅一次) 我在本页上看到了一个可能的解决方案: 我只是不确定在AdobeEdge中将解决方案脚本放在哪里 以下是“creationComplete”中每个iframe的外观: sym.$("About

我正在使用AdobeEdge构建一个网站,我有几个iFrame可以在index.html页面上加载其他html页面。所有文件都在同一个域中

不知道为什么,但一些iframes内容在firefox中无法正确加载。但是当我刷新iframe时,它会完美地加载,因此我需要iframe在加载时自动重新加载(仅一次)

我在本页上看到了一个可能的解决方案:

我只是不确定在AdobeEdge中将解决方案脚本放在哪里

以下是“creationComplete”中每个iframe的外观:

sym.$("AboutPage").append('<iframe width="100%" height="100%" src="About.html" frameborder="0" scrolling="no"></iframe>');
sym.$(“AboutPage”)。附加(“”);
sym.$(“AboutPage”)。追加(“”);
sym.$(“其他页面”)。附加(“”);
var iframeLoadCount=0;
函数重载一次(iframe){
iframeLoadCount++;
if(iframeLoadCount
sym.$("AboutPage").append('<iframe onload="reloadOnce(this)" width="100%" height="100%" src="About.html" frameborder="0" scrolling="no"></iframe>');
sym.$("otherPage").append('<iframe onload="reloadOnce(this)" width="100%" height="100%" frameborder="0" scrolling="no" src="otherPage.html"></iframe>');

var iframeLoadCount = 0;
function reloadOnce(iframe) {
  iframeLoadCount ++;
  if (iframeLoadCount <= 1) {
    iframe.contentWindow.location.reload();
    console.log("reload()");
  }
}