-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
38 lines (37 loc) · 1.52 KB
/
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
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><html-include> demo</title>
<!-- Conditionally load WC polyfills -->
<!-- Thanks to https://github.com/geelen/x-gif for the snippet -->
<script>if (!('registerElement' in document
&& 'createShadowRoot' in HTMLElement.prototype
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template'))) {
document.write('<script src="bower_components/webcomponentsjs/webcomponents.min.js"><\/script>');
}</script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<script src="src/html-include.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelector('pre').innerHTML = document.body.innerHTML
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
});
</script>
</head>
<body>
<html-include src="header.html"></html-include>
<div class="container">
<h1><html-include></h1>
<p>This is how the DOM looks like at the <strong>DOMContentLoaded</strong> event (before inserting the content of <pre>).<br>Compare it against the raw HTML source.</p>
<pre></pre>
</div>
<html-include src="footer.html"></html-include>
</body>
</html>