summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload.html
blob: 37cfdbfb52d91fe6a00e133217114e8aa0a2faa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head>
<script type="text/javascript">
function log(message)
{
    var item = document.createElement("li");
    item.appendChild(document.createTextNode(message));
    document.getElementById("console").appendChild(item);
}
function done()
{
    log("TEST PASSED.");
    if (window.layoutTestController)
        layoutTestController.notifyDone();
 }
if (window.layoutTestController) {
    layoutTestController.dumpAsText();
    layoutTestController.waitUntilDone();
}
</script>
</head>
<body>
<p>This tests that onload events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onload event is their only programatic side-effect.</p>
<p>If it works you should see a message below saying the test has passed.</p>
<link href="prefetch.link" rel="prefetch" onload="done()" >
<hr>
<p><ol id="console"></ol></p>
</body>
</html>