简体   繁体   English

XHR的Selectivizr错误

[英]Selectivizr error with xhr

IE strikes back IE反击

I'm using Selectivizr and IE7-8 throws me a js error at this line: 我正在使用Selectivizr,IE7-8在此行将js错误抛出:

                   // --[ loadStyleSheet() ]-------------
                   function loadStyleSheet( url ) {
/*THIS LINE --->*/ xhr.open("GET", url, false);
                   xhr.send();
                   return (xhr.status==200) ? xhr.responseText : EMPTY_STRING;  
                   };

I've searched in the official page, and my english is not very fluid, but the most accurate with my issue I think is this comment . 我已经在官方页面上进行搜索,但是我的英语不太流畅,但是我认为最准确的是此评论

Don't know if the proyect is supported anymore... 不知道该proyect是否已受支持...

Return of the code 返回代码

  1. I try to comment that block code, and the IE throws me an error in this line: 我尝试注释该块代码,并且IE在这一行中向我抛出错误:

     return loadStyleSheet(url).replace(RE_COMMENT, EMPTY_STRING) 
  2. If I comment again, IE continue throwing me error at different lines, but always related (I think) with the alternate stylesheet. 如果我再次发表评论,IE会继续在不同的行向我抛出错误,但始终与备用样式表相关(我认为)。

  3. The alternate stylesheet is correct, only contains one line of dummy code: table tr {border-top:1px solid green;} , and is properly linked (firebug reads it if I disable JS) 备用样式表是正确的,仅包含一行伪代码: table tr {border-top:1px solid green;} ,并且已正确链接(如果禁用JS,firebug会读取它)

  4. I'm using Mootools library (1.4.2 w/compatibility - minified). 我正在使用Mootools库(1.4.2 w /兼容性-最小化)。

  5. My doctype is correctly displayed (html 4.01) 我的文档类型正确显示(html 4.01)

  6. I call Selectivizr within conditional comments. 我在条件注释中称呼Selectivizr。

A new hope 新希望

If the Selectivizr proyect is dead (anyone knows?) or the error is insurmountable I would appreciate some alternatives to reach a IE7-8 solution to support pseudo-classes. 如果Selectivizr proyect死了(有人知道吗?)或错误是无法克服的,那么我将不胜感激,找到一些支持IE7-8解决方案以支持伪类的替代方法。 I found this question , but... it's closed (but would be very useful for me). 我发现了这个问题 ,但是...已关闭(但对我来说非常有用)。

Can't find anymore related errors googling, and, as my knowledge of JS is minimal, I get stucked at this point. 谷歌搜索不再能找到相关的错误,并且由于我对JS的了解很少,所以我在这一点上陷入了困境。

Well, this is emmbarassing... I found the cause. 好吧,这真令人尴尬...我找到了原因。

It seems that Selectivizr not works in local storage pages. 看来Selectivizr在本地存储页面中不起作用。

I put entire site in an Appserver and enter with localhost, and then works properly and no JS errors. 我将整个站点放在Appserver中,并使用localhost输入,然后正常工作,没有JS错误。

Often see same kind of error in various polyfills. 通常会在各种polyfill中看到相同类型的错误。 I answer the question instead of deleting it in case any user runs into the same doubt... 我回答这个问题,而不是删除它,以防任何用户遇到相同的疑问...

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

相关问题 让 Selectivizr 工作的麻烦 - Troubles getting Selectivizr to Work 如何使IE变得敏感? Selectivizr? - How to get IE to be Responsive? Selectivizr? XHR IE7操作中止JSON错误 - XHR IE7 Operation Aborted JSON Error IE10 / 11 Ajax XHR错误 - SCRIPT7002:XMLHttpRequest:网络错误0x2ef3 - IE10/11 Ajax XHR error - SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3 使用Script7002 IE https CORS XHR请求失败:XMLHttpRequest:网络错误0x2eff - IE https CORS XHR request fails with Script7002: XMLHttpRequest: Network Error 0x2eff 发生 UNAUTHORIZED 错误时 xhr 对象中没有可用的标头 - IE10 - No headers available in xhr object when an UNAUTHORIZED error occurs - IE10 IE 11 XHR故障 - IE 11 XHR Failures 为什么在Windows 10中,即Angular 1.5.8中,当XMLHttpRequest xhr.open('post','http:// localhost'true)时出现“访问被拒绝”错误 - Why in Windows 10, in ie, Angular 1.5.8 there is an “access Denied " error when XMLHttpRequest xhr.open ('post', 'http://localhost' true) IE中未针对XHR请求触发onReadyStateChange - onReadyStateChange not firing in IE for XHR Request Socket.io:为什么htmlfile更喜欢XHR-Polling? - Socket.io: Why is htmlfile preferred to XHR-Polling?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM