Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-fonts/web-font-no-longer-accessible-when-stylesheet-removed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS fonts: Web fonts from removed stylsheets should not be accessible</title>
<link rel="author" title="Martin Robinson" href="mrobinson@igalia.com">
<link rel="match" href="web-font-no-longer-accessible-when-stylesheet-removed-ref.html">
</head>
<body>
<style id="web-font-stylesheet">
@font-face {
font-family: CustomFontFamily;
src: url(/fonts/Ahem.ttf);
}
</style>
<p>Test passes if the text below is not rendered with Ahem.</p>
<p style="font-family: CustomFontFamily;">TEXT</p>
<script>
let styleTag = document.getElementById("web-font-stylesheet");
styleTag.parentNode.removeChild(styleTag);
</script>
</body>
</html>