1
在我的应用程序主页上,我构建了一个“Widgets”系统。小部件的来源是在服务器端生成的,并通过Ajax推送到客户端。从Ajax请求执行内联脚本
Ext.Ajax.request({
url: '/get-widgets',
success: function(response) {
var boxes = Ext.decode(response.responseText);
Ext.each(boxes, function(box) {
box.id = 'cell-' + box.cell;
var element = Ext.DomHelper.append('canvas', {
tag: 'div',
id: box.id,
cls: 'widget size-' + (box.size || '11'),
children: [{
tag: 'div',
cls: 'title',
html: box.title
}, {
tag: 'div',
cls: 'main',
html: box.body
}]
}, true);
});
}
});
的问题是,一些小部件有一些内嵌的JavaScript在自己的身体,需要被执行。这在Firefox中完美工作,但不在Chrome中。
是否有一个标志或您需要激活的内嵌代码执行?