在 Extjs 的外部 html 中使用脚本

Using script in an external html in Extjs

我在 Extjs 的面板中有一个外部 html。但是在我的 html 中用脚本标签定义的脚本没有被加载;因此我的 html 无法正常工作。

var test = Ext.create('Ext.panel.Panel', {
            title : 'Example 1',
            width : 250,
            height : 250,
            frame : true,
            scripts: true,
            autoLoad : {
                url : './test.html'
            }
        })

到目前为止我已经尝试过:

前两个将我的脚本加载到 Extjs(我可以在 firebug 中看到它)但是我的 html 文件仍然无法访问它。

因此;

有哪些(可行的)替代方法可以让它发挥作用?

改为autoLoad config is deprecated. Use loader

var test = Ext.create('Ext.panel.Panel', {
    title : 'Example 1',
    width : 250,
    height : 250,
    frame : true,
    loader: {
       url: './test.html',
       autoLoad: true,
       scripts: true
    }
});