forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML: <img>'s historical progress events
For whatwg/html#4842. Co-Authored-By: Philip Jägenstedt <philip@foolip.org>
- Loading branch information
1 parent
ca7d4f9
commit 444491f
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
html/semantics/embedded-content/the-img-element/historical-progress-event.window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
async_test(t => { | ||
const img = new Image(); | ||
t.add_cleanup(() => img.remove()); | ||
img.onloadstart = img.onprogress = img.onloadend = t.unreached_func("progress event fired"); | ||
img.onload = t.step_func_done(e => { | ||
assert_true(e instanceof Event); | ||
assert_false(e instanceof ProgressEvent); | ||
}); | ||
img.src = "/images/rrgg-256x256.png"; | ||
document.body.append(img); | ||
}, "<img> does not support ProgressEvent or loadstart/progress/loadend"); | ||
|
||
test(t => { | ||
assert_equals(document.body.onloadend, undefined); | ||
assert_equals(window.onloadend, undefined); | ||
}, "onloadend is not exposed"); |