Disqus comments don't work in a polymer custom element

前端 未结 2 711
生来不讨喜
生来不讨喜 2021-01-16 02:53

I don\'t know how to make a disqus comments code to work inside of my custom elements.

Structure of my site:

| index.html
--------\\

2条回答
  •  攒了一身酷
    2021-01-16 03:09

    I wanted to give another possible solution to using Disqus comments in Polymer. The main problem is the inability to use Disqus with elements in the shadow dom because they are hidden. So how can we make a shadow dom element visible? We can pass it down the component hierarchy from the index.html of the application.

    To expose an element structure your html like this:

    index.html
    
      

    In Polymer App: