davidguttman / cssify

Simple middleware for Browserify to add css styles to the browser.
122 stars 19 forks source link

Use document.createStyleSheet when is possible. #9

Closed dosten closed 10 years ago

dosten commented 10 years ago

There is a known bug in IE when create <link> tag on the fly. Use document.createStyleSheet when is possible.

More info: http://msdn.microsoft.com/en-us/library/ie/ms531194(v=vs.85).aspx

dominykas commented 10 years ago

Don't have time to test this right now, but are you sure document.createStyleSheet is OK to be used with CSS, and not with a URL? http://msdn.microsoft.com/en-us/library/ie/ms531194(v=vs.85).aspx

dominykas commented 10 years ago

My bad :) Should have paid more attention :) Also Microsoft wins variable naming.

dominykas commented 10 years ago

@dosten just double checked... when I try to add my styles - I get an error: "SCRIPT14: Not enough storage is available to complete this operation."

And there's also this: image

Do you have a working example?