Alistair Davidson / validation-enhancer · GitLab
Here’s another nice progressive web component for your forms, this time for showing error messages.
This is a good description of the appeal of HTML web components:
WC lifecycles are crazy simple: you register the component with
customElements.defineand it’s off to the races. Just write a class and the browser will take care of elements appearing and disappearing for you, regardless of whether they came from a full reload, a fetch request, or—god forbid—adocument.write. The syntax looks great in markup, too: no more having to decorate withjs-somethingclasses or data attributes, you just wrap your shit in a custom element calledsomething-controllerand everyone can see what you’re up to. Since I’m firmly in camp “progressively enhance or go home” this fits me like a glove, and I also have great hopes for Web Components improving the poor state of pulling in epic dependencies like date pickers or text editors.
Here’s another nice progressive web component for your forms, this time for showing error messages.
Here’s an excellent progressive web component from Aaron—wrap a custom element around your exising form and your good to go:
At its core,
form-saveris a small web component that wraps a form, keeps an eye on it, stores values inlocalStorage, and restores them when the page loads again. Better yet, it clears out saved data after a successful submission so you’re not accidentally resurrecting stale information the next time someone stops by.
Great minds think alike! I have a very similar HTML web component on the front page of The Session called input-autosuggest.
Eric Meyer and Brian Kardell chat with Jay Hoffmann and Jeremy Keith about Shadow DOM’s backstory and long origins
I enjoyed this chat, and it wasn’t just about Shadow DOM; it was about the history of chasing the dream of encapsulation on the web.
I’m obviously biased, but I like the sound of what Chris is doing to create a library of HTML web components.
How I switched to high-resolution maps on The Session without degrading performance.
Web components are supposed to extend the web, not replace it.
Knock, knock! Who’s there? Control freak (now you say “control freak who?”)
Try writing your HTML in HTML, your CSS in CSS, and your JavaScript in JavaScript.
Going back to school in Amsterdam.