Webcomponents.js Issue On Ie And Firefox
I try to make a simple web component. For browser compatibility, I use the NPM package webcomponents.js (version 0.7.23). I run my little code with Polyserve. My code is on Github:
Solution 1:
In your main file index.html
you are loading the webcomponents-lite.js
script, which doesn't include the Shadow DOM polyfill.
Instead, try to load webcomponents.js
.
For Shadow DOM v1 attachShadow()
, you should use instead the ShadyDOM polyfill. In this case you should use webcomponents-lite.js
otherwise there will be a conflict with createShadowRoot()
polyfill.
Baca Juga
- Event Listener For Input's Value Change Through Changing With .val() In Jquery?
- Selecting A Default Value In An R Plotly Plot Using A Selectize Box Via Crosstalk In R, Using Static Html Not Shiny
- Polymer Serve Changes The Served Javascript Files For Internet Explorer 11. How To Make It Work On Another Web Server?
<scriptsrc="./node_modules/webcomponents.js/webcomponents-lite.js"></script><scriptsrc="shadydom.min.js"></script><script>if (!Array.from) {
Array.from = function (object) {
'use strict';
return [].slice.call(object);
};
}
</script>
Post a Comment for "Webcomponents.js Issue On Ie And Firefox"