forked from devpunks/snuggsi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (58 loc) · 1.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!doctype html>
<title><hello-world></title>
<meta name=viewport content=width=device-width,initial-scale=1>
<link rel=stylesheet href=/typography.css>
<link rel=stylesheet href=hello-world/index.css>
<link
as=fetch
rel=preload
id=header-group
href=/examples/header-group>
<script src=/></script>
<header-group>
<h2 slot=header><hello-world></h2>
<a slot=subheader title='See more component examples' href=/examples>See more component examples</a>
</header-group>
<style>
hello-world {
width: 50vw;
display: block;
margin: 1em auto;
}
</style>
<hello-world>
Hello {planet}
</hello-world>
<hello-world>
{greeting} World
</hello-world>
<hello-world>
{greeting} {planet}
</hello-world>
<script defer>
// Element Definition -----------------------------
Element `hello-world`
// Class Description ------------------------------
(class extends HTMLElement {
initialize ()
{ this.append `🌎 ` }
onclick ()
// "automagic" event registration
{ alert (this.textContent) }
get planet ()
// "automagic" token binding
{ return 'from Mars 👽' }
get greeting ()
// "automagic" token binding
{ return 'Bonjour' }
})
</script>
<!--
<figure>
<iframe src=//jsfiddle.net/snuggs/3zwkj9wg/embedded/html,css/dark/?fontColor=ffffff&accentColor=9696f0&bodyColor=3b3b3b&menuColor=3b3b3b frameborder=0></iframe>
</figure>
<figure>
<iframe src=//jsfiddle.net/snuggs/3zwkj9wg/embedded/result/dark/?fontColor=ffffff&accentColor=9696f0&menuColor=3b3b3b frameborder=0></iframe>
</figure>
-->
<script src=/browser-sync.es></script>