extjs - 在 Windows 8 Metro 应用程序中使用 Sencha Touch

标签 extjs windows-8 sencha-touch hybrid-mobile-app

我想知道如何在带有 Windows JS 项目的 Windows 8 Metro 应用程序项目中使用 Sencha Touch Frame。

当我尝试将 sencha Touch 添加到 html 页面时,我收到异常

Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement. For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.

如果没有办法使用 Sencha touch 框架,有没有办法将 Sencha ExtJS 添加到 Windows 8 Metro 应用程序

因为我们还需要为所有主要智能手机平台提供支持。

欢迎提出建议。

最佳答案

替换

document.write(content);

MSApp.execUnsafeLocalFunction(function () {
       document.write(content);
    });

在我们包含在我们的应用程序中的 developement.jstesting.jsproduction.js 中可以做到这一点。特别是我们需要创建一个 function() 并将 document.write(content) 作为该函数内部的语句,然后将该函数作为参数传递给 MSApp.exeUnsafeLocalFunction() 即可实现这一目的。

关于extjs - 在 Windows 8 Metro 应用程序中使用 Sencha Touch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21165397/

相关文章:

node.js - (node.js) Windows 8 toast 通知中的辅助图像从何而来?

javascript - 行为发生奇怪的变化 - Windows 8.1 中的 <textarea>

windows - 帧到视频 - Windows 8 中的图像处理(仅限 WinRT)

javascript - OpenLayers 2 - 如何获取所选要素(点)的坐标

javascript - 在 EXTJS 折线图中创建自定义线条

extjs - Ext-JS 4 与 CakePHP 对比 Ext.direct

css - ExtJS 4/5 - 为自定义规则不允许的拖放设置正确的 CSS

html - 在 Sencha Touch 中为不同的移动设备分辨率创建启动画面

javascript - 如何使用 ExtJs 4 和 MVC 从另一个类访问一个类?

google-maps-api-3 - 在 sencha touch 中设置谷歌标记