101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

488
active users

#customelement

0 posts0 participants0 posts today

#TIL, (and I cannot find documented), but can easily replicate is that when a #WebComponent #CustomElement's `connectedCallback()` is called, `innerHTML` is undefined, UNLESS, you wait to define your custom element after DOMContentLoaded.

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.

[Can't recreate in codepen since it runs all stuff after DOM loaded.]

gist.github.com/davetron5000/2

Continued thread

Through the conversation, I wondered whether the misunderstanding that a #customElement directly correlates to a #frameworkComponent was eased or expanded with the theoretical advent of an HTML Module. Much of what we were seeing as #htmlModules seemed more directly related to what we see in #frameworkComponents, which seems like an interesting path to investigate.

With #domPart and HTML Modules, it it possible to recreate what we know now as a #JSFramework in just HTML!?! 🤯

Replied in thread

@leben

I'm unsure why I have to make the CSS files to bleed both sides (shadowDom, and calling page), I'll learn about that eventually.

Also, its script[type=module] import. Different from past years. Exciting times!

Refer to source served from here:

renoirb.com/esm-modules/app-la

I'm working on a fork of @traceypooh 's blogtini but using #customElement and separating concerns. It's broken, in progress. Hope that helps you.

/cc @heydon

Replied in thread

@bramus @mia @Una Blog post scale; short version: #SpectrumWebComponents themes the system over single components, hoping to ship the smallest amount of JS for an app w/ many components, but it buys you into the system. Focusing on a the #customElement, off loading CSS strings for Adopted Stylesheets to CSS files w/ Import Assertions means more styles can live w/ the components, while maintaining similar complexity & helping prioritize single component usage, allowing to serve more user types.

Replied in thread

@mia It is very possible that Container Style Queries are the CSS feature that I've been most excited about the last number of year, and it is super cool to see more examples come together leveraging them and nudging browsers tiny little steps closer to shipping! 🤩 Thanks for pushing this so hard for the rest of us. 🙏 Binding this with Import Assertions for CSS is gonna take #developingDesignSystem with #customElement and #shadowDOM to a whole new level. 🔥