-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.html
More file actions
62 lines (58 loc) · 1.47 KB
/
object.html
File metadata and controls
62 lines (58 loc) · 1.47 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Microdata Template: Example: Object Source</title>
<link rel="icon" href="data:,">
<script src="../../lib/microdata-template.js" crossorigin="anonymous"></script>
<style>
body {
font-family: monospace;
}
table {
margin: 3em;
}
table tr:nth-child(odd) {
background-color: #f4f4f0;
}
table th,
table td {
padding: 0.5em;
border-bottom: 1px dotted silver;
text-align: left;
}
</style>
</head>
<body>
<main>
<article>
<section>
<table>
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr itemscope itemref="{{ forin:navigator }}" itemid="{{ KEY }}" hidden>
<td itemprop="Key">{{ KEY }}</td>
<td itemprop="Value">{{ VALUE }}</td>
</tr>
</tbody>
</table>
</section>
</article>
</main>
<script>
document.addEventListener("DOMContentLoaded", function() {
// This code will access the browser's navigator object and use it to draw a table.
// Run this in a browser, and be sure to view the rendered source!
var templater = window.MicrodataTemplate.init();
var templateElement = document.getElementsByTagName("TBODY")[0].getElementsByTagName("TR")[0];
templater.getSetShowHeritage(true);
templater.refresh(templateElement, { navigator: navigator });
});
</script>
</body>
</html>