Danny Engelman 🌷🏍️🛥️
engelman.nl
Danny Engelman 🌷🏍️🛥️
@engelman.nl
I do modern Web Component Development with technologies supported by **all** WHATWG partners (Apple, Google, Microsoft & Mozilla)

👨🏻‍💻TRS-80 Scriptkiddie '79+
🎓 Computer Science '87 - '92
❤️ Online since 1990 yes! 1990 I started with Email and Gopher
> "with Lit", yeah - unless you're looking to punish yourself,
> you're not building anything serious without a framework 😅

So if vanilla is C and Lit is C++
Why are (some) people still using C ?

I do vanilla only (and steal the good parts from Lit)
November 27, 2025 at 11:05 AM
Looks great,

But isn't this like saying you have a cute cousin,
and we are not allowed to date him?

where's the demo?
November 25, 2025 at 8:53 AM
dank je wel
November 23, 2025 at 9:30 AM
salt...

Lit IMHO, is a framework,
because it frames you into using HTML
I don't use HTML, I use document.createElement
its faster, no salt
November 22, 2025 at 12:37 PM
Analyzing (undocumented) libraries used to take some time.
With AI its just "explain this code"
November 22, 2025 at 12:18 PM
I need salt
I explore salt content in Lib X
I need less or more salt
I take/copy salt from Lib X
[1 year later] My own library still has the correct amount of salt
Lib X adds pepper
I only copy half the pepper
[5 years later] My own library is still to my own taste
My code runs with 0 dependencies
November 22, 2025 at 12:12 PM
But the fun?

I can buy a soup-starter in the supermarket;
or I can buy vegetables and make my own stock.

You can never take the salt out
November 21, 2025 at 1:50 PM
The CSS psuedo class :state is not that well known;
but needs JS code in the Web Component

developer.mozilla.org/en-US/docs/W...
:state() - CSS | MDN
The :state() CSS pseudo-class matches custom elements that have the specified custom state.
developer.mozilla.org
November 21, 2025 at 1:42 PM
I almost always write an Anonymous class:

𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙙𝙚𝙛𝙞𝙣𝙚(
'𝙢𝙮-𝙘𝙤𝙢𝙥',
𝙘𝙡𝙖𝙨𝙨 𝙚𝙭𝙩𝙚𝙣𝙙𝙨 𝙃𝙏𝙈𝙇𝙀𝙡𝙚𝙢𝙚𝙣𝙩 { // anonymous class
...
});

since you hardly ever need that (bloated) Named Exported class

Maybe never, since 𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙜𝙚𝙩('𝙢𝙮-𝙘𝙤𝙢𝙥')
gets you that anonymous class
November 21, 2025 at 9:25 AM
Great intro video,

can you type 120 keys per second?
November 20, 2025 at 11:23 AM
> Is a web component?

open to debate...

Used WITHOUT using JS, it is a UNDEFINED Custom Element.

ANY with a dash IS a valid HTMLElement
perfectly valid to use and style with CSS

Some say only JS created DEFINED Custom Elements are Web Components.

dashed-html.github.io
dashed-html.github.io
November 19, 2025 at 7:52 PM
AI made it myself!
November 16, 2025 at 11:02 AM
> Web components are just objects

I would say they are JUST DOM ELEMENTS.

The only difference between <video> and <my-web-component>
is the former is written by a Browser vendor

They are both Web Components

Questioning if WCs work with Frameworks is questioning if <video> works in Frameworks.
November 13, 2025 at 10:04 AM
*REPLACING* the shadowRoot is notable behavior

You can replace an existing shadowRoot on a DSD, either on a regular DOM element or on a Custom Element once

Any more tries cause:
𝘍𝘢𝘪𝘭𝘦𝘥 𝘵𝘰 𝘦𝘹𝘦𝘤𝘶𝘵𝘦 '𝘢𝘵𝘵𝘢𝘤𝘩𝘚𝘩𝘢𝘥𝘰𝘸' 𝘰𝘯 '𝘌𝘭𝘦𝘮𝘦𝘯𝘵': 𝘚𝘩𝘢𝘥𝘰𝘸 𝘳𝘰𝘰𝘵 𝘤𝘢𝘯𝘯𝘰𝘵 𝘣𝘦 𝘤𝘳𝘦𝘢𝘵𝘦𝘥 𝘰𝘯 𝘢 𝘩𝘰𝘴𝘵 𝘸𝘩𝘪𝘤𝘩 𝘢𝘭𝘳𝘦𝘢𝘥𝘺 𝘩𝘰𝘴𝘵𝘴 𝘢 𝘴𝘩𝘢𝘥𝘰𝘸 𝘵𝘳𝘦𝘦
November 13, 2025 at 9:52 AM
Isn't it like doing:

𝘷𝘢𝘳 𝘈 = 1
𝘷𝘢𝘳 𝘈 = 2
𝘤𝘰𝘯𝘴𝘰𝘭𝘦.𝘭𝘰𝘨( 𝘈 )

Same applies for:

<𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>
<𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦 𝘴𝘩𝘢𝘥𝘰𝘸𝘳𝘰𝘰𝘵𝘮𝘰𝘥𝘦="𝘰𝘱𝘦𝘯">
𝘐 𝘢𝘮 𝘊𝘶𝘴𝘵𝘰𝘮 𝘌𝘭𝘦𝘮𝘦𝘯𝘵 𝘴𝘩𝘢𝘥𝘰𝘸𝘙𝘰𝘰𝘵 𝘤𝘰𝘯𝘵𝘦𝘯𝘵
</𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦>
</𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>

When you upgrade it AND run attachShadow AGAIN
November 13, 2025 at 9:49 AM
Yes, modules loads late...
But no one really cares, a good Lit site can still load fast, and with a fade-in animation after :not(:defined) { display:none } FOUCs still occur but won't be seen.
I don't do Lit, only do native, I am that crazy farmer that doesn't use pesticides.
November 7, 2025 at 5:32 PM
jsfiddle.net/WebComponent...

open the F12 console !!

The simulates
The <tag-name> connectedCallback fires on the *opening* <tag-name> tag, so there is no (light)DOM parsed yet.
November 7, 2025 at 12:23 PM
No LS and FOUCs when Web Components are defined *before* DOM is parsed, ie. loaded in the <head>

Alas most developers load Web Components with defer or as module; executing them the (good) old jQuery (and most Frameworks) way;

parse DOM then replace it with some other DOM.... LS and FOUCs galore.
November 7, 2025 at 10:08 AM
> too lazy

Its dumping your code into ONE connectedCallback method and fixing some DOM creation
Took me maybe 10 minutes

I then refactored it, still as an experiment keeping all code in ONE Method
But mainly focussing on my own Web Components displaying a starter page

HTH

image-reveal.github.io
November 5, 2025 at 12:02 PM
#4 ??

UNdefined Custom Elements do not require JavaScript.

Since a long time ANY with a dash IS a valid HTMLElement, NOT! HTMLUnknownElement as some gurus and AI claim.

That means you can use meaningful and only CSS to replace the DIV soup.

dashed-html.github.io
dashed-html.github.io
November 4, 2025 at 9:14 AM
OK, I continued reading, and stopped again when you played the NO JavaScript card.

75% of the World Population can't read English.
So with 14% you are better of translating your site to Mandarin, than the 0.2% that can't "read" JavaScript.
November 3, 2025 at 8:07 PM
I stopped reading when you chanted the 10 year old <template> mantra. No need for a <template> at all in your example.
November 3, 2025 at 6:24 PM
> 99.8% of web users have JS enabled.
> How much time should I devote to that 0.2%?

Maybe a wake-up call for you Muricans;
75% of the World Population can NOT read English...

So what IS your 𝒍𝒂𝒏𝒈𝒖𝒂𝒈𝒆 priority?
More Mandarin (14%) or less JavaScript (0.2%)?
November 2, 2025 at 9:53 AM
Carcassonne is easier with a rotating fixed size square layout in a CSS grid, where rows and columns are added Top-Bottom-Left-Right

Dominos probably requires masonry (not supported in a browser yet)

Maybe next weeks team Web Component challenge; we did Ludo once; all NAMED slots and CSS grid-area
October 31, 2025 at 4:29 PM