I'm trying to enable Polymer web components for Firefox so that I can navigate through my Polymer webpage on Firefox.
I tried these instructions but nothing has changed and it seems like Firefox totally ignores my components.
https://www.designedbyaturtle.co.uk/2015/how-to-enable-web-components-in-firefox-shadow-dom/
I'm also importing the webcomponents.js
polyfills in my index.html
.
So, what I've done is the following:
I've written the following web component test-firefox.html
in the directory elements
:
<dom-module name="test-firefox">
<template>
<h2>Firefox says hi too!</h2>
</template>
<script>
Polymer({
is: 'test-firefox'
});
</script>
</dom-module>
and this is my index.html
file:
<!doctype html>
<html>
<head>
<link rel="import" href="webjars/polymer/1.6.1/polymer.html">
<script src="webjars/webcomponentsjs/0.7.22/webcomponents.js"></script>
<script src="webjars/webcomponentsjs/0.7.22/webcomponents-lite.min.js"></script>
<link rel="import" href="elements/test-firefox.html">
</head>
<body>
<h1>Hello Firefox!</h1>
<test-firefox></test-firefox>
</body>
</html>`
As you can see, instead of the bower_components
, I'm using the corresponding webjars
(for Polymer
, webcomponents.js
, webcomponents-lite.min.js
). I've added the dependencies for those in my pom.xml
and they are normally installed.
So what I noticed that happens is quite strange:
- For Google Chrome, everything works perfectly fine.
- For Mozilla Firefox on Linux, the same.
- For Mozilla Firefox on Win10, the web component is not getting rendered, it is like the browser totally ignores it.
Any ideas?