Re: [csswg-drafts] Define which subresources block the DOM load event

> Everything except Edge delays the load event for background-image

Chrome delays the load event of __Document__  (which is tested by https://github.com/web-platform-tests/wpt/pull/5525) but not the load event of the __`<link>` element__ for background images.
The behavior of Firefox looks the same.

Modified @bzbarsky's test case in https://github.com/whatwg/html/pull/3544:
"link loaded in" console log appears immediately, and "document loaded in" appears 4 seconds later.

```
<!DOCTYPE html>
<script>
  var start = performance.now();
</script>
<body
      onload="console.log('document loaded in: ' + (performance.now() - start))"
>
<div id="fox" class="fox" style="position: absolute; width: 1024px; height: 1024px;">fox</div>
<link rel="stylesheet"
      href="data:text/css,.fox{ background-image: url('http://software.hixie.ch/utilities/cgi/test-tools/delayed-file?pause=4&mime=text%2Fhtml&text=NOT+A+STYLESHEET');}"
      onload="console.log('link loaded in: ' + (performance.now() - start))"
      onerror="console.log('link errored in: ' + (performance.now() - start))">
```


-- 
GitHub Notification of comment by hiroshige-g
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1088#issuecomment-427126353 using your GitHub account

Received on Thursday, 4 October 2018 18:39:29 UTC