webcomponents / webcomponents/polyfills

[ShadyCSS] Cannot load the polyfill async

Open
#33 3 comments 0 reactions 0 assignees View on GitHub
Package: shadycss Severity: Low Type: Bug wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

I'm trying to load the polyfills conditionally, async and am not able to shim styles.

http://jsbin.com/qaxifecapa/edit?html,output works in Canary, but not in other browsers.

If you uncomment the `` tags in that jsbin that load the polyfills and replace this:

``` javascript
lazyLoadWCPolyfillsIfNecessary().then(function(events) {
if (!supportsShadowDOMV1) {
ShadyCSS.prepareTemplate(CardSwiper.template, CardSwiper.is);
}
window.customElements.define(CardSwiper.is, CardSwiper);
});
```

with:

``` javascript
ShadyCSS.prepareTemplate(CardSwiper.template, CardSwiper.is);
window.customElements.define(CardSwiper.is, CardSwiper);
```

then the demo works as expected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.