pablolarah,
@pablolarah@mastodon.social avatar

💡🌖 But what about the shadow DOM?
by Chris Ferdinandi @ChrisFerdinandi @cferdinandi
#WebComponents #shadowDOM #webdev

https://gomakethings.com/but-what-about-the-shadow-dom/

westbrook,
@westbrook@mastodon.social avatar

@pablolarah @cferdinandi

> And declarative shadow DOM doesn’t fix the JS dependency. You may author your code as HTML, but it’s in a <template> element, hidden from the user. It only becomes visible after JS loads.

This is incorrect. #devlarativeShadowDOM is parser magic, not JS magic.

cferdinandi,
@cferdinandi@mastodon.social avatar

@westbrook @pablolarah The end result is the same regardless. No JS, no content visible to the user. https://developer.chrome.com/docs/css-ui/declarative-shadow-dom

westbrook,
@westbrook@mastodon.social avatar

@cferdinandi @pablolarah turnoff you JS and you’ll still see https://codepen.io/pen/

cferdinandi,
@cferdinandi@mastodon.social avatar

@westbrook @pablolarah I stand corrected! Need to update my article. Thank you!

westbrook,
@westbrook@mastodon.social avatar

@cferdinandi it is JUST shadow DOM, which can have varying levels of benefit, especially alone. But, not needing JS for it is another step in the right direction.

pablolarah,
@pablolarah@mastodon.social avatar

@westbrook @cferdinandi It works on Codepen, but I tried in an html file uploaded to my server without any css nor js and it has nothing.
Maybe it is because Codepen supplies default js libraries?

Michel Foucault, The History of Sexuality, Volume 1: An Introduction Michel Foucault, The History of Sexuality, Volume 1: An Introduction

cferdinandi,
@cferdinandi@mastodon.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • webdev
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines