DOMContentLoaded and stylesheet loading, reads computed style

When DOMContentLoaded fires, the background of the page is read and subsequently set to green. An externally loaded stylesheet sets it to red. Thus, if DOMContentLoaded fires before the stylesheet has loaded, the background will be red which is incorrect.

The current implementation supports WebKit, Gecko, Opera and IE.

The source of the stylesheet:

<?php 
  header("Content-Type: text/css\n\r");
  sleep(5);
?>

body {
  background-color: red;
}

Log