-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (40 loc) · 1.25 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Multiple versions of the same Elix component on a single page</title>
<!-- Elix 7.0 component, which auto-registered all components with "elix-" prefix. -->
<script type="module" src="node_modules/elix-7/src/DateComboBox.js"></script>
<!-- Elix 8.0 component that does not auto-register itself. -->
<script type="module">
// Import the component we want.
import DateComboBox from './node_modules/elix-8/src/DateComboBox.js';
// Create a subclass just in case someone else is using the same version.
class DateComboBox2 extends DateComboBox {}
// Register our custom subclass.
customElements.define('date-combo-box-2', DateComboBox2);
</script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
margin: 0;
padding: 25px;
}
</style>
</head>
<body>
<p>
This page uses Elix 7.0 and Elix 8.0 components side-by-side.
</p>
<p>
Elix 7.0 DateComboBox:
<elix-date-combo-box></elix-date-combo-box>
</p>
<p>
Elix 8.0 DateComboBox:
<date-combo-box-2></date-combo-box-2>
</p>
</body>
</html>