-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.html
72 lines (59 loc) · 2.42 KB
/
search.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
<!doctype html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<style>
body {
background: #fafafa;
}
</style>
</head>
<body>
<script type="module">
import '../dist/src/prprabhu-providers-search.js';
</script>
This element is unwrapped by a provider.
<prprabhu-providers-search-hello></prprabhu-providers-search-hello>
<prprabhu-providers-search id="p1">
This element is wrapped by a provider that has no context.
<prprabhu-providers-search-hello id="h1"></prprabhu-providers-search-hello>
</prprabhu-providers-search>
<prprabhu-providers-search id="p2" world="Uranus">
This element is wrapped by a provider that has context.
<prprabhu-providers-search-hello id="h2"></prprabhu-providers-search-hello>
</prprabhu-providers-search>
<prprabhu-providers-search id="p3">
This element is wrapped by a provider for which the context is set later via JS.
<prprabhu-providers-search-hello id="h3"></prprabhu-providers-search-hello>
</prprabhu-providers-search>
<script>
document.getElementById('p3').setAttribute("world", "Neptune");
</script>
<prprabhu-providers-search id="p4" world="Jupiter">
Nested elements with context.
<prprabhu-providers-search-hello id="h4.1">
<prprabhu-providers-search-hello id="h4.2"></prprabhu-providers-search-hello>
</prprabhu-providers-search-hello>
</prprabhu-providers-search>
<prprabhu-providers-search id="p5" world="Mercury">
Nested elements with context. Nested through shadow-dom.
<h3>BROKEN</h3>
<prprabhu-providers-search-hello-nested id="h5.1">
<prprabhu-providers-search-hello id="h5.2"></prprabhu-providers-search-hello>
</prprabhu-providers-search-hello-nested>
</prprabhu-providers-search>
<prprabhu-providers-search id="p6.1" world="Pluto">
<prprabhu-providers-search id="p6.2" world="Earth">
Nested providers. Innermost wins!
<prprabhu-providers-search-hello id="h6"></prprabhu-providers-search-hello>
</prprabhu-providers-search>
</prprabhu-providers-search>
<prprabhu-providers-search-questionable id="p7" world="Venus">
This element is wrapped by an alternative provider.
Provider polymorphism happens via composition. This is the only way the components can find the "real" provider via
tagName.
<h3>BROKEN</h3>
<prprabhu-providers-search-hello id="h7"></prprabhu-providers-search-hello>
</prprabhu-providers-search-questionable>
</body>
</html>