Extjs 4: Create an iFrame Window

后端 未结 1 1562
暖寄归人
暖寄归人 2021-02-02 10:35

I am in need of creating an iFrame Window in Extjs. Previously in ExtJS 3.x I would do this:

bodyCfg: {
    tag: \'iframe\'
}

But the Win

相关标签:
1条回答
  • 2021-02-02 11:23

    I think autoEl is what you are looking for...

    Some advice from me, in Ext 4.x don't use autoEl as a window config property, it can make your window malformed.. I suggest you to use autoEl in a component (items of your window)

    new Ext.Window({
        title : "iframe",
        width : 300,
        height: 300,
        layout : 'fit',
        items : [{
            xtype : "component",
            autoEl : {
                tag : "iframe",
                src : "http://www.yahoo.com"
            }
        }]
    }).show();
    

    The code above is better than

    new Ext.Window({
        title : "iframe",
        width : 300,
        height: 300,
        layout : 'fit',
        autoEl : {
           tag : "iframe",
           src : "http://www.yahoo.com"
        }
    }).show();
    

    Note: currenty you can't load Google and Facebook inside an iframe

    0 讨论(0)
提交回复
热议问题