-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
29 lines (28 loc) · 1.33 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Inspector Component</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-hi-sd-ce.js"></script>
<link rel="import" href="./inspector-component.html">
</head>
<body>
<inspector-component data="Hello World"></inspector-component>
<hr>
<inspector-component data='["56dcf573b09c217d39fd7621", "Hello World"]'></inspector-component>
<hr>
<inspector-component data='{"_id":"56dcf573b09c217d39fd7621", "name":"Hello World"}'></inspector-component>
<hr>
<inspector-component data='{"_id":"56dcf573b09c217d39fd7621","name":"Howard Christensen","email":"[email protected]","phone":"+1 (830) 529-3176","address":"511 Royce Street, Hilltop, Tennessee, 9712","friends":[{"_id":"56dcf573b09c217d39fd7621","name":"Howard Christensen","email":"[email protected]","phone":"+1 (830) 529-3176","address":"511 Royce Street, Hilltop, Tennessee, 9712"}]}'></inspector-component>
<hr>
<div id="logs">
</div>
<script>
const d = Array(5).fill({index: 0, data: '0'}).map((i, _i) => ({index: _i, data: `${_i}`}));
console.log(d);
const i = document.createElement('inspector-component');
i.setAttribute('data', JSON.stringify(d));
document.querySelector('#logs').appendChild(i);
</script>
</body>
</html>