Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Capacitor doesn't support Shadow DOM? 😭

$
0
0

hi.
I ran my code on android studio and nothing appeared on the screen(everything works in the browser).
Without shadow DOM, web components are displayed.

<body>
    <chat-page></chat-page>
</body>

    <script type="module">

      import css from "./sheet.css" with { type: 'css' }; //  #chat { width: 300px; height: 300px;border: red thin solid; }

      customElements.define(`chat-page`, class extends HTMLElement {
        constructor() {
          super();
          this.attachShadow({mode:"open"});
          this.shadowRoot.adoptedStyleSheets = [css];
          this.shadowRoot.innerHTML="<div id='chat'></div>";
        }
}
</script>

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>