我想知道如何使用Sencha框架在windows 8地铁应用程序项目与Windows项目。
当我尝试向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 框架,那么是否有任何方法可以将Sencha ExtJS添加到windows 8 metro应用程序中。
因为我们需要提供对所有主要智能手机平台的支持。
欢迎提出建议。
发布于 2014-01-22 05:52:44
替换
document.write(content);使用
MSApp.execUnsafeLocalFunction(function () {
document.write(content);
});在developement.js或、testing.js、或production.js中,我们在应用程序中包含了这些技巧。特别是,我们需要创建一个函数(),其中的document.write(内容)作为该函数中的语句,然后传递该函数作为MSApp.exeUnsafeLocalFunction()的参数。
发布于 2014-01-16 17:54:50
我认为您必须在一个execUnsafeLocalFunction调用中封装一些微加载程序代码,因为Windows不喜欢在核心Sencha库中使用的eval、document.write和其他一些位。
发布于 2014-01-18 08:19:33
我相信您正在包含脚本并在静态页面中使用来自脚本的函数,即使使用简单的javascript方法,错误也会显示出来。若要解决此问题,请使用集线器控件。以下是集线器快速启动http://msdn.microsoft.com/en-us/library/windows/apps/dn412707.aspx的msdn链接
https://stackoverflow.com/questions/21165397
复制相似问题