Firefox 3.6 has removed document.getBoxObjectFor which will impact Gecko detection.
原文: The getBoxObjectFor() method has been removed, as it was non-standard and exposed even more non-standard stuff to the web. See bug 340571. Also affects MooTools which uses this call for Gecko detection; this has been fixed in the latest version of MooTools, so be sure to update.
所以用下面的方法来检测浏览器是否为firefox,是错误的。
document.getBoxObjectFor && USERAGENT.indexOf(‘firefox’) != -1 && USERAGENT.substr(USERAGENT.indexOf(‘firefox’) + 8, 3);
某个版本的discuz正是这样做的。
Firefox 3.6 has removed document.getBoxObjectFor which will impact Gecko detection.
原文:
The getBoxObjectFor() method has been removed, as it was non-standard and exposed even more non-standard stuff to the web. See bug 340571. Also affects MooTools which uses this call for Gecko detection; this has been fixed in the latest version of MooTools, so be sure to update.
所以用下面的方法来检测浏览器是否为firefox,是错误的:
document.getBoxObjectFor && USERAGENT.indexOf(‘firefox’) != -1 && USERAGENT.substr(USERAGENT.indexOf(‘firefox’) + 8, 3);
某个版本的discuz正是这样做的。
