Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've been working on this exact problem for the last few months.</p> <p>Bottom line there is a polyfill that works^ on evergreen browsers here <a href="https://github.com/Polymer/ShadowDOM">https://github.com/Polymer/ShadowDOM</a></p> <p><em>^ polyfilling of CSS features like @host are not in there yet, coming soon</em></p> <p>So, yes, it's a hard thing to polyfill, specifically because we have to invent secondary DOM trees. We tried to make it as user-friendly as possible, which required the use of a rather invasive wrapper technique. </p> <p>In other words, if you <code>div = document.createElement('div')</code>, you get a thing that looks like a DIV and works like a DIV, but is actually a Wrapper object. The ultimate goal of course, is for your code to look the same whether its running under the polyfill or under a native implementation.</p> <p>It's not 100% bulletproof, in particular it's not possible for us to wrap <code>document</code> for you, so you have to do that yourself, a la:</p> <pre><code>wrap(document).querySelector(...) </code></pre> <p>Other than the <code>document</code> issue, the wrappers are intended to work transparently. This is all brand new, so I apologize for the lack of docs. We are working on that as we speak.</p> <p>Please <a href="https://github.com/Polymer/ShadowDOM/issues/new">file issues</a> if you have questions or problems, we love to get feedback. There is also an email channel for discussing this polyfill (and the other polyfills in that org) at polymer-dev@googlegroups.com.</p> <blockquote> <blockquote> <p>I doubt this stuff is widely implemented </p> </blockquote> </blockquote> <p>True, but it's in Chrome at least.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload