-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.html
33 lines (29 loc) · 831 Bytes
/
index.html
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
30
31
32
33
<!DOCTYPE html>
<!--[if IE 7]><html class="IE IE7" lang="en"><![endif]-->
<!--[if IE 8]><html class="IE IE8" lang="en"><![endif]-->
<!--[if IE 9]><html class="IE IE9" lang="en"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head>
<meta charset="UTF-8" />
<title><template> polyfill</title>
</head>
<body>
<template id="first">
<!-- HTML comment -->
<p>Template content</p>
<template id="sub">
<p>Mind blowing: a template inside a template</p>
</template>
</template>
<script src="template.js"></script>
<script>
var
// Retrieve the <template> element
template = document.getElementById("first"),
// Clone the template
clone = template.clone();
// Now, we can simply append the document fragment
document.body.appendChild(clone.content);
</script>
</body>
</html>