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

XDomainRequest - onload #90

Open alanparsons opened 9 years ago

alanparsons commented 9 years ago

Not really an issue but just a different approach to something that cropped up.

I'm not sure if this is something someone else has already come across but I was trying to implement this and found it was having issues with XDomainRequest and was not returning any of the files content until I added the xhr.responseText inside a xhr.onload function. This however threw up other issues due to the files content only being sent back one the onload was finished which is far too slow for the current implementation.

I am not 100% sure if this is a an issue with XDomainRequest or because I was trying to fetch my CSS files from an S3 bucket.

I have however got this working to a degree here https://github.com/alanparsons/selectivizr This will only work with one import within a file at the moment and not multi level imported files but it works for the scenario I encountered.

Hope this helps anyone else out.