I am a novice when it comes to working with Polymer. From what I have gathered, there seems to be compatibility issues with Mozilla and Safari. After researching on StackOverflow, I found that adding
addEventListener('WebComponentsReady', function() {
});
could potentially resolve the browser compatibility issues. I implemented this solution in my code and it did help with displaying content properly in Mozilla. However, it ended up causing conflicts with the JavaScript code I had written alongside Polymer. I attempted two different approaches, the first one being:
addEventListener('WebComponentsReady', function() {
Polymer({
is: "main-header"
}); });
Even after trying this method, error logs continued to appear in the console. When I tried wrapping the entire script inside the event listener, it still did not work. For example:
addEventListener('WebComponentsReady', function() {
Polymer({
is: "main-header"
});
// extra code here
});
I suspect that enclosing the addEventListener within the whole code might be contributing to the issue. Does anyone have suggestions for resolving this problem? Are there any alternative solutions besides utilizing an event listener in the code?