mootools 和 firefox 4 问题
几个月前,我在一个网站上工作,我使用了互联网上一个资源网站上的 mootools menumatic。当时 Firefox 4 仍处于测试阶段,我没有在其中测试我的菜单,目前我在 Firefox 4 中进行了测试,令人惊讶的是脚本不起作用。问题可能出在哪里。提前致谢。在此处输入链接说明
I was working on a site some months ago and I used mootools menumatic from one of the resources sites from the internet.Firefox 4 was still beta at that time and I didnt tested my menu in it and currently i tested in firefox 4 and amazingly the script didnt work.where might be the problem.Thanks in advance.enter link description here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你使用mootools 1.2.0 - 只是为了让我们清楚这里的一些事情,我是重复我自己,但是你走了...
mootools 1.2.0 已经 3 岁了 - http://ajaxian.com/archives/mootools-12-released - 2008 年 6 月 13 日。发布时,firefox 4 是甚至不是一个设计概念。
mootools 1.2 依赖于功能检测 - 阅读上面链接的上一个线程 - 以及现已弃用的
getBoxObjectFor
来确定您是否使用基于 Gecko 的浏览器(例如 FireFox)。在您的网站上在 FF4 中运行这个小测试:通过 firebug 控制台):
底线是,菜单可以工作,但在尝试使用特定样式设置器/获取器时会创建一个 javascript 异常,由于框架不理解浏览器,该异常将失败版本。这可能不是唯一的错误,但您需要编写一些广泛的测试来捕获所有问题,因为许多问题可能会导致不同/不需要的功能,而不是彻底的异常。
简而言之,您可能不想听到的答案:升级您的 mootools 至至少 1.2.5.1 或理想情况下 1.3.2 - 您可能需要使用兼容模式版本,以便您的旧插件继续使用工作。
其他重大更改:
Function.bind
过去用于获取bindObj, [args]
的参数,现在原生定义为bindObj, arg1,... argn
code>最后,你可能想接受一些答案,50% 太低了
you use mootools 1.2.0 - just so we are clear on a few things here, and I am repeating myself but there you go...
mootools 1.2.0 is now 3 years old - http://ajaxian.com/archives/mootools-12-released - june 13th 2008. at the time of release, firefox 4 was not even a design concept.
mootools 1.2 relied on feature detection - read the previous thread linked above - and on the now deprecated
getBoxObjectFor
to determine if you were in a gecko-based browser like FireFox. Running this small test in FF4 on your site:(via the firebug console):
Bottom line is, the menu works but it creates a javascript exception when trying to use specific style setters/getters that will fail due to the framework not understanding the browser version. This is likely NOT going to be the only error but you will need to write some extensive tests to catch all problems as many may result in different/undesired functionality rather than outright exceptions.
In short, the answer you may not want to hear: upgrade your mootools to AT LEAST 1.2.5.1 or ideally, 1.3.2 - you may need to use the compatibility mode version so your old plugins continue to work.
Other breaking changes:
Function.bind
used to take args ofbindObj, [args]
and is now natively defined asbindObj, arg1,... argn
And finally, you may want to accept some answers, 50% is way too low