mirror of
https://github.com/servo/servo.git
synced 2025-07-13 10:23:40 +01:00
28 lines
925 B
HTML
28 lines
925 B
HTML
<style>
|
|
@font-face {
|
|
font-family: ahem;
|
|
src: url(http://{{domains[www]}}:{{ports[http][1]}}/resource-timing/resources/cors-ahem.py);
|
|
}
|
|
</style>
|
|
<div style="font-family: ahem;">This fetches ahem font.</div>
|
|
<script>
|
|
if (location.hash === '#check') {
|
|
document.fonts.ready.then(()=> {
|
|
const entries = performance.getEntriesByName('http://{{domains[www]}}:{{ports[http][1]}}/resource-timing/resources/cors-ahem.py');
|
|
if (entries.length != 1)
|
|
return;
|
|
const entry = entries[0];
|
|
window.parent.postMessage({
|
|
"domainLookupStart": entry.domainLookupStart,
|
|
"domainLookupEnd": entry.domainLookupEnd,
|
|
"connectStart": entry.connectStart,
|
|
"connectEnd": entry.connectEnd
|
|
}, "*");
|
|
});
|
|
} else {
|
|
document.fonts.ready.then(() => {
|
|
location.hash = 'check';
|
|
location.reload();
|
|
});
|
|
}
|
|
</script>
|