Domanda

IE strikes back

I'm using Selectivizr and IE7-8 throws me a js error at this line:

                   // --[ 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...

Return of the code

  1. I try to comment that block code, and the IE throws me an error in this line:

    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.

  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)

  4. I'm using Mootools library (1.4.2 w/compatibility - minified).

  5. My doctype is correctly displayed (html 4.01)

  6. I call Selectivizr within conditional comments.

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. 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.

È stato utile?

Soluzione

Well, this is emmbarassing... I found the cause.

It seems that Selectivizr not works in local storage pages.

I put entire site in an Appserver and enter with localhost, and then works properly and no JS errors.

Often see same kind of error in various polyfills. I answer the question instead of deleting it in case any user runs into the same doubt...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top