Ext.isIE在IE 11中返回false [英] Ext.isIE return false in IE 11
问题描述
当我尝试在IE11中使用Ext.isIE时,我将返回值为false。然后在调试期间我的代码我看到我得到以下错误:
JavaScript错误 - Msg:无效的参数。
我的extjs的版本是:4,2
When I try to use Ext.isIE in IE11 i get false the returning value. And then during the debug my code I see that I get the following error: JavaScript Error - Msg:Invalid argument., my extjs's version is: 4,2
推荐答案
IE 11在ExtJS 4.2.2之前未正式支持(请参阅属性 isIE11
)。 Microsoft从IE11的用户代理中删除了 MSIE
部分(请参阅 here ),这就是为什么它不能与ExtJS 4.2.1(即最新的GPL版本)及以下版本一起使用的原因。
IE 11 is not officially supported prior to ExtJS 4.2.2 (see property isIE11
). Microsoft removed the MSIE
part from IE11's user agent (refer here), which is the reason why it does not work with ExtJS 4.2.1 (i.e. the latest GPL version) and below.
从源代码中,对于 ExtJS 4.2.1 :
isIE = !isOpera && check(/msie/),
isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7),
isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8),
isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9),
isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10),
isIE6 = isIE && check(/msie 6/),
和 ExtJS 4.2.2 :
isIE = !isOpera && (check(/msie/) || check(/trident/)),
isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7),
isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8),
isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9),
isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10),
isIE11 = isIE && ((check(/trident\/7\.0/) && docMode != 7 && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 11),
isIE6 = isIE && check(/msie 6/),
这篇关于Ext.isIE在IE 11中返回false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!