在 EXT2.0运行正常的程序,调换 EXT2.2 的脚本之后使用 <iframe> 时,窗口出现 '无法打开 Internet 站点' 的错误.
解决办法是:
找到ext-all.js文件,删除代码:Q=setInterval(function(){try{Ext.isReady||document.documentElement.doScroll("left"))}catch(D){return }C()},5);
未压缩的是docReadyProcId=setInterval(function(){try{Ext.isReady||(document.documentElement.doScroll('left'));}catch(e){return;}
fireDocReady();},5);
释放ifarme占用的内存
while(tabs.getComponent(0)!=null){ // 在移除tabpanel前,释放内嵌iframe占用的内存 tabs.getComponent(0).on("beforeremove", this.fixIFrame, this); fixIFrame: function(lr, cp, e) { var iFrame = cp.getEl().dom; if(iFrame.src) { iFrame.src = "javascript:false"; } }; // 移除tab并释放内存 tabs.remove(tabs.getComponent(0),true); }
上面是项目中的代码,在应用的时候可以根据需要稍做修改。 参考http://extjs.com/forum/showthread.php?t=11406