Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.html
More file actions
Latest commit
45 lines (42 loc) · 1005 Bytes
/
Copy pathexample.html
File metadata and controls
45 lines (42 loc) · 1005 Bytes
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
<html>
<head>
<title>Inspect</title>
<scriptsrc="build/build.js"></script>
<style>
body {
padding:80px;
font:16px/1.6 Helvetica;
}
p {
width:600px;
}
code {
color:#888;
}
</style>
</head>
<body>
<h1>Inspect</h1>
<p>Open web inspector, enable via <code>localStorage.dev = true</code>, refresh the page, view <code>_</code> in the "properties" panel or with <code>$0._</code>.</p>
<ul></ul>
<script>
vardev=require('dev');
varul=document.querySelector('ul');
functionUserView(user){
this.user=user;
this.el=document.createElement('li');
this.el.textContent=user.name;
dev(this.el,user);
}
varusers=[
{name: 'Tobi',species: 'ferret'},
{name: 'Loki',species: 'ferret'},
{name: 'Jane',species: 'ferret'}
];
users.forEach(function(user){
varview=newUserView(user);
ul.appendChild(view.el);
});
</script>
</body>
</html>