mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Previously we would run it once within `set_src()` and then again within `set_property()` which would lead to us creating two new `FontFace`s instead of just one
20 lines
468 B
HTML
20 lines
468 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<style>
|
|
@font-face {
|
|
font-family: Foo;
|
|
src: url("./Foo.woff");
|
|
}
|
|
</style>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
promiseTest(async () => {
|
|
await document.fonts.ready.then(() => {
|
|
document.styleSheets[0].cssRules[0].style.src = 'url("./Bar.woff")';
|
|
|
|
println(document.fonts.size);
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|