summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html
blob: 2d5d76c0a82b4a90c6a4a795e564aa31acfb58c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<body>
<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();
</script>
<html>
<p>This test passes if it doesn't crash.</p>
<div id="frag"></div>
<script>
// Fun with innerHTML.
document.getElementById('frag').innerHTML = '<link href="prefetch.link" rel="prefetch">';

// Fun with detached documents.
var doc = document.implementation.createDocument('application/html+xml');
var lnk = doc.createElement('link');
lnk.setAttribute('rel', 'prefetch');
lnk.setAttribute('href', 'prefetch.link');
doc.documentElement.appendChild(lnk);
</script>
</html>