👨🏻💻TRS-80 Scriptkiddie '79+
🎓 Computer Science '87 - '92
❤️ Online since 1990 yes! 1990 I started with Email and Gopher
> 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)
> 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)
But isn't this like saying you have a cute cousin,
and we are not allowed to date him?
where's the demo?
But isn't this like saying you have a cute cousin,
and we are not allowed to date him?
where's the demo?
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
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
With AI its just "explain this code"
With AI its just "explain this code"
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
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
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
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
but needs JS code in the Web Component
developer.mozilla.org/en-US/docs/W...
but needs JS code in the Web Component
developer.mozilla.org/en-US/docs/W...
𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙙𝙚𝙛𝙞𝙣𝙚(
'𝙢𝙮-𝙘𝙤𝙢𝙥',
𝙘𝙡𝙖𝙨𝙨 𝙚𝙭𝙩𝙚𝙣𝙙𝙨 𝙃𝙏𝙈𝙇𝙀𝙡𝙚𝙢𝙚𝙣𝙩 { // anonymous class
...
});
since you hardly ever need that (bloated) Named Exported class
Maybe never, since 𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙜𝙚𝙩('𝙢𝙮-𝙘𝙤𝙢𝙥')
gets you that anonymous class
𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙙𝙚𝙛𝙞𝙣𝙚(
'𝙢𝙮-𝙘𝙤𝙢𝙥',
𝙘𝙡𝙖𝙨𝙨 𝙚𝙭𝙩𝙚𝙣𝙙𝙨 𝙃𝙏𝙈𝙇𝙀𝙡𝙚𝙢𝙚𝙣𝙩 { // anonymous class
...
});
since you hardly ever need that (bloated) Named Exported class
Maybe never, since 𝙘𝙪𝙨𝙩𝙤𝙢𝙀𝙡𝙚𝙢𝙚𝙣𝙩𝙨.𝙜𝙚𝙩('𝙢𝙮-𝙘𝙤𝙢𝙥')
gets you that anonymous class
can you type 120 keys per second?
can you type 120 keys per second?
open to debate...
Used WITHOUT using JS, it is a UNDEFINED Custom Element.
ANY
perfectly valid to use and style with CSS
Some say only JS created DEFINED Custom Elements are Web Components.
dashed-html.github.io
open to debate...
Used WITHOUT using JS, it is a UNDEFINED Custom Element.
ANY
perfectly valid to use and style with CSS
Some say only JS created DEFINED Custom Elements are Web Components.
dashed-html.github.io
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.
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.
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:
𝘍𝘢𝘪𝘭𝘦𝘥 𝘵𝘰 𝘦𝘹𝘦𝘤𝘶𝘵𝘦 '𝘢𝘵𝘵𝘢𝘤𝘩𝘚𝘩𝘢𝘥𝘰𝘸' 𝘰𝘯 '𝘌𝘭𝘦𝘮𝘦𝘯𝘵': 𝘚𝘩𝘢𝘥𝘰𝘸 𝘳𝘰𝘰𝘵 𝘤𝘢𝘯𝘯𝘰𝘵 𝘣𝘦 𝘤𝘳𝘦𝘢𝘵𝘦𝘥 𝘰𝘯 𝘢 𝘩𝘰𝘴𝘵 𝘸𝘩𝘪𝘤𝘩 𝘢𝘭𝘳𝘦𝘢𝘥𝘺 𝘩𝘰𝘴𝘵𝘴 𝘢 𝘴𝘩𝘢𝘥𝘰𝘸 𝘵𝘳𝘦𝘦
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:
𝘍𝘢𝘪𝘭𝘦𝘥 𝘵𝘰 𝘦𝘹𝘦𝘤𝘶𝘵𝘦 '𝘢𝘵𝘵𝘢𝘤𝘩𝘚𝘩𝘢𝘥𝘰𝘸' 𝘰𝘯 '𝘌𝘭𝘦𝘮𝘦𝘯𝘵': 𝘚𝘩𝘢𝘥𝘰𝘸 𝘳𝘰𝘰𝘵 𝘤𝘢𝘯𝘯𝘰𝘵 𝘣𝘦 𝘤𝘳𝘦𝘢𝘵𝘦𝘥 𝘰𝘯 𝘢 𝘩𝘰𝘴𝘵 𝘸𝘩𝘪𝘤𝘩 𝘢𝘭𝘳𝘦𝘢𝘥𝘺 𝘩𝘰𝘴𝘵𝘴 𝘢 𝘴𝘩𝘢𝘥𝘰𝘸 𝘵𝘳𝘦𝘦
𝘷𝘢𝘳 𝘈 = 1
𝘷𝘢𝘳 𝘈 = 2
𝘤𝘰𝘯𝘴𝘰𝘭𝘦.𝘭𝘰𝘨( 𝘈 )
Same applies for:
<𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>
<𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦 𝘴𝘩𝘢𝘥𝘰𝘸𝘳𝘰𝘰𝘵𝘮𝘰𝘥𝘦="𝘰𝘱𝘦𝘯">
𝘐 𝘢𝘮 𝘊𝘶𝘴𝘵𝘰𝘮 𝘌𝘭𝘦𝘮𝘦𝘯𝘵 𝘴𝘩𝘢𝘥𝘰𝘸𝘙𝘰𝘰𝘵 𝘤𝘰𝘯𝘵𝘦𝘯𝘵
</𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦>
</𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>
When you upgrade it AND run attachShadow AGAIN
𝘷𝘢𝘳 𝘈 = 1
𝘷𝘢𝘳 𝘈 = 2
𝘤𝘰𝘯𝘴𝘰𝘭𝘦.𝘭𝘰𝘨( 𝘈 )
Same applies for:
<𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>
<𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦 𝘴𝘩𝘢𝘥𝘰𝘸𝘳𝘰𝘰𝘵𝘮𝘰𝘥𝘦="𝘰𝘱𝘦𝘯">
𝘐 𝘢𝘮 𝘊𝘶𝘴𝘵𝘰𝘮 𝘌𝘭𝘦𝘮𝘦𝘯𝘵 𝘴𝘩𝘢𝘥𝘰𝘸𝘙𝘰𝘰𝘵 𝘤𝘰𝘯𝘵𝘦𝘯𝘵
</𝘵𝘦𝘮𝘱𝘭𝘢𝘵𝘦>
</𝘤𝘶𝘴𝘵𝘰𝘮-𝘦𝘭𝘦𝘮𝘦𝘯𝘵>
When you upgrade it AND run attachShadow AGAIN
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.
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.
open the F12 console !!
The
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.
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.
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
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
UNdefined Custom Elements do not require JavaScript.
Since a long time ANY
That means you can use meaningful
dashed-html.github.io
UNdefined Custom Elements do not require JavaScript.
Since a long time ANY
That means you can use meaningful
dashed-html.github.io
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.
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.
> 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%)?
> 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%)?
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
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
Connect Bluesky
Enter your Bluesky handle and app password to unlock posting, likes, and your Following feed.
Need an app password? Open Bluesky, go to Settings > App passwords, and create a new one.
Connect with Bluesky
Sign in with your Bluesky account to unlock posting, likes, and your Following feed.