mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Previously we would always try to load the font URL relative to the document's base URL. This commit means that for CSS-connected `FontFace`s we now try to load relative to the URL of the stylesheet that contains the associated `CSSFontFaceRule`
19 lines
664 B
HTML
19 lines
664 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<link href="../../../Ref/data/fonts/ahem.css" rel="stylesheet" />
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
promiseTest(async () => {
|
|
await document.fonts.ready.then(async () => {
|
|
await document.fonts
|
|
.load('10px \\"Ahem\\"')
|
|
.then(loadedFonts => {
|
|
if (loadedFonts.length == 1) println("PASS!");
|
|
else println("FAIL! Didn't match any fonts.");
|
|
})
|
|
.catch(e => println("FAIL! Exception during font load: " + e));
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|