selectivizr
selectivizr copied to clipboard
Allow use of different-domain CSS with XDomainRequest
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.
+1
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 ?