kriszyp / xstyle

A declarative, reactive framework that extends CSS

Home Page:http://kriszyp.github.com/xstyle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xstyle fails to recognize sheets with imports as loaded in chrome

neonstalwart opened this issue · comments

if a stylesheet has an @import, inserting a rule at index 0 will throw an error in chrome - HIERARCHY_REQUEST_ERR: DOM Exception 3. presumably this is because it breaks the rule that imports should precede everything else.

because of this exception, the sheet is never marked as ready and xstyle keeps checking to see if the sheet is ready.

i've observed this in chrome 21 beta.

i'd be curious to see if the method described in #5 works for all browsers. it seems like a cleaner approach to testing readiness if it in fact works.

I have also seen this issue. I have a dojo app that has several pages in a StackContainer containing dgrids (that's the only component I'm using that makes use of xstyle). Occasionally while viewing one of the dgrid pages, Chrome's CPU usage will climb up to 100% and stay there, seemingly permanently. The Timeline tool in Chrome's webdev console shows the sequence of 1) timer at line 217 in load-css.js firing, 2) styleIsApplied() being called, and 3) the timer being reinstalled; all happening over and over. This only happens in Chrome (I'm using v21), never in Safari or Firefox.

thanks i no longer see the CPU hovering at ~80% in chrome