mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Implement FontFaceSet.clear()
This commit is contained in:
committed by
Sam Atkins
parent
6e0bdd79e4
commit
3fd4eb56ee
Notes:
github-actions[bot]
2026-01-05 16:17:02 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3fd4eb56ee9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7323 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Myles C. Maxfield" href="mmaxfield@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-font-loading-3/#dom-fontfaceset-clear">
|
||||
<meta name="assert" content="Ensure that calling clear() does not remove CSS-connected FontFaces." />
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "WebFont";
|
||||
src: url("resources/Rochester.otf") format("opentype");
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
test(function(t) {
|
||||
let fonts = document.fonts;
|
||||
let font = fonts.keys().next().value;
|
||||
assert_equals(fonts.size, 1);
|
||||
fonts.clear();
|
||||
assert_equals(fonts.size, 1);
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user