I'm not sure which phase of web component adoption this is, but this little bit of duct tape has been working wonders for me! 😊 #JavaScript #webdev
Post
calebhailey.comcustomElements.apply()A (naive?) alternative to customElements.define().
Thanks to @adactio.com, @jakelazaroff.com, and @cferdinandi.bsky.social for your many words on the topic of HTML Web Components. Please save me if this is a horrible idea! 😅
Last year, Nathan Fowler suggested user defined Web Components, like this: gomakethings.com/user-defined... If collisions are happening a lot for you, that suggests that your naming conventions aren't specific enough. I'd personally address that first.
gomakethings.comUser-defined Web ComponentsOver the weekend, Remy Sharp asked…
Are we at all worried, or even wary, of web component name collisions?
The concern here is that if you have a custom element named <toggle-tabs>, and then importa...
Oh, this might also be useful for you: gomakethings.com/how-to-dynam...
gomakethings.comHow to dynamically load Web ComponentsOver the last year, I’ve converted all of my code bases over from traditional DOM manipulation or JS-rendered UI to mostly pre-rendered HTML and Web Components.
Today, I wanted to quickly show you how...
OK, yeah, this is almost exactly the situation I’m in. And I’ve done something similar in my hugo projects (where I *love* using shortcodes).
0 reposts0 likes