Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo doesn't work in Firefox #20

Open
ankon opened this issue Jul 5, 2017 · 1 comment
Open

Demo doesn't work in Firefox #20

ankon opened this issue Jul 5, 2017 · 1 comment

Comments

@ankon
Copy link
Contributor

ankon commented Jul 5, 2017

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
Copy link
Contributor Author

ankon commented Dec 1, 2017

Issue still exists with Build identifier: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
screen-paper-date-picker-item-demo-ff57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants