_sortieren

117 bookmarks
Custom sorting
DOM diffing with vanilla JS
DOM diffing with vanilla JS
A couple of weeks ago, we looked at how to build reactive, state-based components with vanilla JS. How to create a state-based UI component How to add reactivity to a state-based UI component with Proxies How to batch UI rendering for better performance Today, we’re going to learn how to add DOM diffing to our component. If you haven’t yet, go back and read the first three articles, or today’s won’t make a whole lot of sense.
·gomakethings.com·
DOM diffing with vanilla JS
The Web smallest DOM diffing library
The Web smallest DOM diffing library
This post is a recap of a personal journey, that lasted about 3 years, in search of the best DOM diffing options I could find.
·webreflection.medium.com·
The Web smallest DOM diffing library
Web Components Are Easier Than You Think | CSS-Tricks
Web Components Are Easier Than You Think | CSS-Tricks
When I’d go to a conference (when we were able to do such things) and see someone do a presentation on web components, I always thought it was pretty nifty
·css-tricks.com·
Web Components Are Easier Than You Think | CSS-Tricks
DOM City
DOM City
Learning the DOM-API in a playful way
·dom-city.github.io·
DOM City
Four different ways to inject text and HTML into an element with vanilla JavaScript
Four different ways to inject text and HTML into an element with vanilla JavaScript
Today, we’re going to look at four different techniques you can use to get and set text and HTML in DOM elements. Let’s dig in! The Element.innerHTML property You can use the Element.innerHTML property to get and set the HTML content inside an element as a string. div class="greeting" pHello world!/p /divlet greeting = document.querySelector('.greeting'); // Get HTML content // returns "pHello world!/p" let html = greeting.innerHTML; // Set HTML content // This replaces what was in there already greeting.
·gomakethings.com·
Four different ways to inject text and HTML into an element with vanilla JavaScript
Five more ways to inject HTML into the dom with vanilla JavaScript
Five more ways to inject HTML into the dom with vanilla JavaScript
Yesterday, we looked at four ways to inject text and HTML into the DOM with vanilla JS. Today, we’re going to look at five more. Let’s dig in! The document.createElement() method You can use the document.createElement() method to create an element. Pass in the element to create, without angled brackets (), as an argument let div = document.createElement('div'); let link = document.createElement('a'); let article = document.createElement('article'); You can use any valid HTML tag, and even create custom ones, too.
·gomakethings.com·
Five more ways to inject HTML into the dom with vanilla JavaScript
How to create a search page for a static website with vanilla JS
How to create a search page for a static website with vanilla JS
One of the biggest missing features from most static site generators (like Hugo, 11ty, and Jekyll, ) is that they lack built-in search. Database-driven platforms like WordPress make a server call and search the database to find matching content. Static websites have no database to query. Today, I’m going to share how I built the search functionality for my site with vanilla JS. Let’s dig in! Quick aside: done-for-you alternative If you don’t want to roll-your-own search functionality, Algolia and ElasticSearch are two done-for-you search vendors.
·gomakethings.com·
How to create a search page for a static website with vanilla JS
CTA Modal: How To Build A Web Component — Smashing Magazine
CTA Modal: How To Build A Web Component — Smashing Magazine
In this article, Nathan Smith explains how to create modal dialog windows with rich interaction that will only require authoring HTML in order to be used. They are based on Web Components that are currently supported by every major browser.
·smashingmagazine.com·
CTA Modal: How To Build A Web Component — Smashing Magazine
Lottie-Animationen in Websites integrieren
Lottie-Animationen in Websites integrieren
Mit Lottie könnt ihr unkompliziert skalierbare und interaktive Animationen in Websites integrieren. Das sog. Lottie-File basiert auf JSON und wird mittels JavaScript in die Website integriert.
·kulturbanause.de·
Lottie-Animationen in Websites integrieren
Custom events with vanilla JS
Custom events with vanilla JS
JavaScript provides developers with a way to emit custom events that developers can listen for with the Element.addEventListener() method. We can use custom events to let developers hook into the code that we write and run more code in response to when things happen. They provide a really flexible way to extend the functionality of a library or code base. Today, we’re going to learn how they work. Let’s dig in!
·gomakethings.com·
Custom events with vanilla JS
Custom event naming conventions
Custom event naming conventions
This week, we looked at how to create custom events with vanilla JS, and a helper function to make things a bit easier. Today, we’re going to look at different naming conventions for custom events. To help prevent naming collisions, it’s a good idea to prefix custom events with your library or project name. // Namespaced to the Calculator library emit('calculator-add'); One common naming convention is kebab-case. // kebab-case naming emit('calculator-add'); Another convention is to put a colon (:) between the library name and the event type.
·gomakethings.com·
Custom event naming conventions
How and why we removed jQuery from GOV.UK
How and why we removed jQuery from GOV.UK
Removing jQuery from GOV.UK was a huge yet manageable task that led to improved code and performance gains across the site. This is how and why we did this work.
·insidegovuk.blog.gov.uk·
How and why we removed jQuery from GOV.UK
FormData - Web APIs | MDN
FormData - Web APIs | MDN
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the fetch() or XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
·developer.mozilla.org·
FormData - Web APIs | MDN
Histoire
Histoire
Fast stories powered by Vite
·histoire.dev·
Histoire