vanilla,
@vanilla@social.spicyweb.dev avatar

Sometimes need to know what’s happening inside of them.

Whether you’re working with the concept of “slots” or just plain ol’ , you may need to react to changes imposed from without.

Thankfully, the native platform provides a solution in the form of MutationObserver, an API which is so powerful it can beat at the heart of entire frameworks (Stimulus being but one example).

examples by @raymondcamden and @jaredwhite:

https://thathtml.blog/2024/03/more-fun-with-web-components-and-mutationobserver/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • webdev
  • kavyap
  • thenastyranch
  • khanakhh
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • everett
  • Durango
  • rosin
  • ethstaker
  • provamag3
  • tacticalgear
  • cisconetworking
  • modclub
  • cubers
  • osvaldo12
  • vwfavf
  • GTA5RPClips
  • normalnudes
  • anitta
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines