LibWeb: Add FontFaceSetLoadEvent

This commit is contained in:
Tim Ledbetter
2026-01-05 17:18:29 +00:00
committed by Jelle Raaijmakers
parent 581d6ce6e7
commit 2ff77589df
Notes: github-actions[bot] 2026-01-06 11:25:43 +00:00
9 changed files with 133 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<title>FontFaceSetLoadEvent constructor</title>
<link rel="help" href="https://drafts.csswg.org/css-font-loading/#fontfacesetloadevent">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function() {
var ff = [];
var e = new FontFaceSetLoadEvent('type');
assert_array_equals(e.fontfaces, ff);
assert_not_equals(e.fontfaces, ff);
}, 'FontFaceSetLoadEvent constructor without FontFaceSetLoadEventInit dictionary');
test(function() {
var ff = [ new FontFace('family', 'src') ];
var e = new FontFaceSetLoadEvent('type', { fontfaces: ff });
assert_array_equals(e.fontfaces, ff);
assert_not_equals(e.fontfaces, ff);
}, 'FontFaceSetLoadEvent constructor with FontFaceSetLoadEventInit dictionary');
</script>