forked from fleety/date-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 1.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Date Parser</title>
<link rel="import" href="./date-parser.html" async>
</head>
<body>
<template is="dom-bind">
<span>Timestamp: <input type="text" value="{{timestamp::change}}"></span>
<span>Format: <input type="text" value="{{format::change}}"></span>
<br>
<date-parser
timestamp="{{timestamp}}"
format={{format}}>
</date-parser>
</template>
<script>
window.Polymer = { dom: 'shadow', lazyRegister: true };
(function() {
'use strict';
var onload = function() {
if (!window.HTMLImports) {
document.dispatchEvent(
new CustomEvent('WebComponentsReady', {bubbles: true})
);
}
};
var webComponentsSupported = (
'registerElement' in document
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template')
);
if (!webComponentsSupported) {
var script = document.createElement('script');
script.async = true;
script.src = '/bower_components/webcomponentsjs/webcomponents-lite.min.js';
script.onload = onload;
document.head.appendChild(script);
} else {
onload();
}
})();
</script>
</body>
</html>