1
0
Fork 0
firefox/testing/web-platform/tests/preload/resources/modulepreload-iframe.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

20 lines
No EOL
593 B
HTML

<!DOCTYPE html>
<body>
<script>
const m = new URL('module1.js', location.href).toString();
const observer = new PerformanceObserver(l => {
const entries = l.getEntriesByName(m);
if (entries.length === 1) {
import(m).then(() => {
observer.disconnect();
const all = performance.getEntriesByName(m);
window.parent.postMessage(all.length, '*');
});
}
});
observer.observe({type: 'resource', buffered: true});
</script>
</body>