material-design-icons

How to use Material Design Icons in a web component?

♀尐吖头ヾ 提交于 2020-05-09 07:01:07
问题 Looks like that mdi is not working inside web components, or do I miss something? I want to develop a web component that encapsulates it's dependencies, adding the link to the parent document works, but it violates the original intent. <html> <body> <x-webcomponent></x-webcomponent> <script> customElements.define( "x-webcomponent", class extends HTMLElement { constructor() { super(); this.attachShadow({ mode: "open" }); this.shadowRoot.innerHTML = ` <style>@import url('https://cdn