简体   繁体   English

在iOS5中未定义'undefined'

[英]'undefined' is undefined in ios5

I upgraded to ios5 and my little app o longer works. 我已升级到ios5,并且我的小应用程序不再可用。 I am getting a really nebulous error JavaScript error undefined type error 'undefined' is not an object The problem is, I don't have a variable called undefined. 我收到了一个非常模糊的错误JavaScript错误undefined类型错误'undefined'不是对象问题是,我没有一个名为undefined的变量。 I am also getting a cache manifest error Application cach manifest has an incorrect Mime type image/png Which I believe is a result of my script converting an svg canvas to a png (it worked in its 4). 我也遇到了缓存清单错误。应用程序cach清单的Mime类型为image / png不正确,我认为这是我的脚本将svg canvas转换为png的结果(它在其4中起作用)。 Any help with this weird, nebulous undefined error would help. 对这个奇怪的,模糊的不确定错误的任何帮助都将有所帮助。 I tried using alerts to try and see what variable is being declared undefined, but the error simply states undefined is not an object and gives no variable name or even what line of code the error appears on. 我尝试使用警报来尝试查看被声明为undefined的变量,但是错误只是指出undefined不是对象,并且没有给出变量名,甚至没有给出错误出现在哪行代码。

Code below 下面的代码

Can not properly format code from iPad despite using menu buttons, please try the link below and view source. 尽管使用了菜单按钮,仍无法从iPad正确格式化代码,请尝试下面的链接并查看源代码。

You can view it here lesserslavery.org/ice.html 您可以在此处查看lesserslavery.org/ice.html

The undefined-error means you are trying to access a variable in an object way, even though the object is not defined. 未定义错误表示即使您未定义对象,您仍试图以对象方式访问变量。 Probably you are assuming somewhere that certain element was assigned for the variable, which it wasn't. 可能是您假设某个位置为变量分配了某些元素,而实际上并不是。

For the mime type question, your server probably is sending wrong mime type with the file defined in cache.manifest. 对于mime类型问题,您的服务器可能正在使用cache.manifest中定义的文件发送错误的mime类型。 Check possible explanation here: Debugging html5 offline web apps 在此处检查可能的解释: 调试html5脱机Web应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM