My style sheets are dynamically served by ASP.Net (using a rerouting system). It seems that the loadStyleSheet successfully gets the sheet. Because the sheet in question is empty the xhr.responseText returns null, which will cause a JavaScript error.
Changing the code to the following fixed my problem:
My style sheets are dynamically served by ASP.Net (using a rerouting system). It seems that the loadStyleSheet successfully gets the sheet. Because the sheet in question is empty the xhr.responseText returns null, which will cause a JavaScript error.
Changing the code to the following fixed my problem:
I admit that is is weird to serve an empty stylesheet, but I think it should not break.