Dave Copeland :ruby:<p><a href="https://ruby.social/tags/TIL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TIL</span></a>, (and I cannot find documented), but can easily replicate is that when a <a href="https://ruby.social/tags/WebComponent" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WebComponent</span></a> <a href="https://ruby.social/tags/CustomElement" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CustomElement</span></a>'s `connectedCallback()` is called, `innerHTML` is undefined, UNLESS, you wait to define your custom element after DOMContentLoaded.</p><p>I wish there was a callback for a custom element that amounted to “the element has been loaded", but I can see that this doesn't necessarily make sense.</p><p>[Can't recreate in codepen since it runs all stuff after DOM loaded.]</p><p><a href="https://gist.github.com/davetron5000/255ff81851c18a220fa73b329cd8ed4d" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">gist.github.com/davetron5000/2</span><span class="invisible">55ff81851c18a220fa73b329cd8ed4d</span></a></p>