keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

Allow use of different-domain CSS with XDomainRequest #29

Open adammessinger opened 12 years ago

adammessinger commented 12 years ago

I can't use Selectivizr on my current project because the CSS files are hosted on a subdomain. The script could check to see if a stylesheet's href is on the same domain, and if not use XDomainRequest instead of XMLHttpRequest.

I believe this only works on IE8 or higher, and requires the Access-Control-Allow-Origin header on the server with the CSS file be set to permit the request. Those seem like reasonable implementation trade-offs for this functionality, however.

ITspirit commented 10 years ago

+1

Hugues-Antoine commented 9 years ago

I started to work on that. From what I see, selectivzr is only working in synchronous mode, and for XDomainRequeset we need asynchronous. Do you know it there is a way to make selectivizr use the asynchronous mode ?