mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Avoid marking image element as complete before its image data is available.
This commit is contained in:
parent
db79dfb3aa
commit
f79850754d
3 changed files with 30 additions and 1 deletions
|
@ -0,0 +1,17 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Image element delays window's load event</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<img src="resources/cat.jpg?pipe=trickle(d2)">
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var saw_img_load = false;
|
||||
document.querySelector('img').onload = t.step_func(function() {
|
||||
saw_img_load = true;
|
||||
});
|
||||
addEventListener('load', t.step_func_done(function() {
|
||||
assert_true(saw_img_load);
|
||||
}));
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue