Demo doesn't work in Firefox
ankon opened this issue · 1 comments
ankon commented
Build identifier: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Node 7.10 with polymer-cli 1.3.0 polymer serve
.
The page is just empty, and the console does contain some Polymer-related errors.
Some things I did try:
diff --git a/demo/index.html b/demo/index.html
index eeebbe4..ea87deb 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -1,16 +1,15 @@
<!doctype html>
<html>
<head>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="../../iron-icons/iron-icons.html">
<link rel="import" href="../../paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../../paper-item/paper-item.html">
<link rel="import" href="../../paper-listbox/paper-listbox.html">
+ <link rel="import" href="../../moment-element/moment-with-locales-import.html">
<link rel="import" href="../paper-date-picker-item.html">
<link rel="import" href="../paper-datetime-picker-item.html">
- <script src="../../moment/min/locales.min.js"></script>
-
<title>Demo</title>
</head>
@@ -33,14 +32,16 @@
</template>
<script>
- var scope = document.querySelector("template[is=dom-bind]");
- scope.locales = moment.locales();
- scope.locale = moment.locale();
- scope.setLocale = function(e) {
- scope.locale = e.detail.item.label;
- }
- scope.minDate = moment().startOf('day');
- scope.maxDate = moment().add(7, 'days').endOf('day');
+ window.addEventListener('WebComponentsReady', function(e) {
+ var scope = document.querySelector("template[is=dom-bind]");
+ scope.locales = moment.locales();
+ scope.locale = moment.locale();
+ scope.setLocale = function(e) {
+ scope.locale = e.detail.item.label;
+ }
+ scope.minDate = moment().startOf('day');
+ scope.maxDate = moment().add(7, 'days').endOf('day');
+ });
</script>
</body>
</html>
ankon commented