在iframe关闭时将其src设置为false.我是将IFrame做成继承Ext.Panel的UI,释放的时候重写destroy,
代码如下:
destroy:function(){
this.iframe.dom.src=false;
Business.IFrame.superclass.destroy.apply(this, arguments);
CollectGarbage();
},
本文介绍了一种在ExtJS框架中实现IFrame面板销毁的方法,通过重写destroy方法并将其src属性设置为false来释放资源。此外还提供了一个垃圾回收的调用,确保资源得到妥善管理。
在iframe关闭时将其src设置为false.我是将IFrame做成继承Ext.Panel的UI,释放的时候重写destroy,
代码如下:
destroy:function(){
this.iframe.dom.src=false;
Business.IFrame.superclass.destroy.apply(this, arguments);
CollectGarbage();
},

被折叠的 条评论
为什么被折叠?