devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
395 stars 17 forks source link

TypeError: window.customElements is undefined (Firefox) #137

Closed robcole closed 6 years ago

robcole commented 6 years ago

Currently occurs in Firefox (latest - 55.0.3 / OSX). Can be replicated on examples in cloned repo.

This appears to be preventing snuggsi from working in FF. Currently paired with webcomponents-lite.js but have attempted other polyfills (webcomponents-hi-ce etc), none of which appears to be working.

Firefox Bugzilla Ticket Tracker Reference

robcole commented 6 years ago

Things to note (this is in a production use-case, not in our current examples):

When using Firefox and disabling web components (in about:config), then loading the polyfill before snuggsi (this part is unclear in the README.md - would like to clarify documentation there), I am able to load the component; however, template binding/interpolation is not working, generating markup like this (for a component which works in Safari/Chrome).

Chrome:

<advocate-link href="null">
  <a href="" style="pointer-events: none; cursor: default; color: #333">Test Donor 875</a>
</advocate-link>

Firefox

<advocate-link href="null">
  <a href="{advocatelink}">Test Donor 875</a>
</advocate-link>

Will add more info as I debug further.

snuggs commented 6 years ago

🎉 WOOT for finding this @robcole. On it like white on rice. /cc @brandondees

snuggs commented 6 years ago

@robcole also fair to note (as mentioned in slack) the high priority right now is THIS ticket and https://github.com/devpunks/snuggsi/pull/136 which both will address all of your concerns. (The latter is re: to your template issues). Expected turnaround is anyday (starting tomorrow). I did about 80% of the work on the later of the two this past weekend.

snuggs commented 6 years ago

@robcole found it! Was doing some recon with @neiljohari. Looks like we at least can reference where bug is in Firefox. Will update this description as well. And associate with Pull Request for archival's sake.

Thanks for the push in the right direction @neiljohari!

Firefox Bugzilla Ticket Tracker Reference

snuggs commented 6 years ago

@robcole Closing due to being fixed since polyfill removal back in August/September. /cc @brandondees