I\'m trying to dynamically add a css stylesheet rule using javascript, something like example 2 here.
It works most of the time, but there seems to be a race condition t
This should help: 'When is a stylesheet really loaded'
As for 'Example 2'. It will break if there is stylesheet loading when you call addStylesheetRules(), of course that is in Chrome.