mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 3f3849c5d05f9350fad0b06d3bb3ae30d7e18d14
This commit is contained in:
parent
9a7e2663e8
commit
f767403c00
310 changed files with 8134 additions and 895 deletions
13
tests/wpt/web-platform-tests/loading/lazyload/common.js
Normal file
13
tests/wpt/web-platform-tests/loading/lazyload/common.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Helper to access the element, its associated loading promise, and also to
|
||||
// resolve the promise.
|
||||
class ElementLoadPromise {
|
||||
constructor(element_id) {
|
||||
this.element_id = element_id;
|
||||
this.promise = new Promise(resolve => {
|
||||
this.resolve = resolve
|
||||
});
|
||||
}
|
||||
element() {
|
||||
return document.getElementById(this.element_id);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue