在Windows 8地铁应用程序中使用Sencha Touch [英] Use Sencha Touch in Windows 8 metro app

查看:141
本文介绍了在Windows 8地铁应用程序中使用Sencha Touch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I want to know how to use Sencha Touch Frame in windows 8 metro app project with Windows JS project.

当我尝试添加sencha Touch到html页面我收到例外

When i try to add sencha Touch to html page i receive exception

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触摸框架有什么办法将 Sencha ExtJS添加到Windows 8地铁应用程序

If there is no way to use Sencha touch framework is there any way to add Sencha ExtJS to windows 8 metro app.

因为我们需要支持所有的主要智能手机平台

Because we need to provide support all major Smart Phone platform also.

推荐答案

替换

document.write(content);

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

>或 production.js ,我们在应用程序中包含了这个技巧。 Particulary我们需要在该函数内创建一个带有document.write(content)as语句的function(),然后将该函数作为MSApp.exeUnsafeLocalFunction()的参数传递给

in developement.js or testing.js or production.js which we included in our application will did that trick. Particulary we need create a function() with document.write(content) as statement inside that function then pass that function as argument for MSApp.exeUnsafeLocalFunction() will do that trick.

这篇关于在Windows 8地铁应用程序中使用Sencha Touch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆