Search

Nalezeno "javascript": 803

Designing a JavaScript Plugin System


WordPress has plugins. jQuery has plugins. Gatsby, Eleventy, and Vue do, too. Plugins are a common feature of libraries and frameworks, and for a good reason: they allow developers to add functionality, in a safe, scalable way. This makes the core project more valuable, and it builds a community...

Match Emojis with Regular Expressions


When experimenting with unicode property escapes, to identify accented letters in strings, it reminded me of a question I had a few years ago: what is the best way to identify and then replace emojis in a string? I first noticed this practice when using emojis in Facebook — sometimes Facebook...

Simple Node.js Proxy


When I wanted to refresh my React.js skills, I quickly moved to create a dashboard of cryptocurrencies, their prices, and and other aspects of digital value. Getting rolling with React.js is a breeze — create-react-app {name} and you’re off and running. Getting the API working...

radEventListener: a Tale of Client-side Framework Performance


React is popular, popular enough that it receives its fair share of criticism. Yet, this criticism of React isn’t completely unwarranted: React and ReactDOM total about 120 KiB of minified JavaScript, which definitely contributes to slow startup time. When client-side rendering in React is relied...

Stacked Cards with Sticky Positioning and a Dash of Sass


The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll. I started wondering how much JavaScript this would involve and how you’d go about making it when I realized — ah! — this must be the work...

Practical Use Cases for JavaScript’s closest() Method


Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance: <div data-id="123"<buttonClick me</button</div That’s pretty straightforward, right? Say...

PSF Token Invokes the First Coin-Age Staking Protocol on Bitcoin Cash


During the last six months, the Simple Ledger Protocol has grown immensely and there’s been 9,604 SLP tokens created since the infrastructure launched. Just recently news.Bitcoin.com reported on mistcoin, the mineable SLP token that can be mined with a CPU. Now software developer Chris...

Nailing the Perfect Contrast Between Light Text and a Background Image


Have you ever come across a site where light text is sitting on a light background image? If you have, you’ll know how difficult that is to read. A popular way to avoid that is to use a transparent overlay. But this leads to an important question: Just how transparent should that overlay...

JavaScript Fatigue


From Nicholas Zakas’ newsletter, on how he avoids JavaScript fatigue:  I don’t try to learn about every new thing that comes out. There’s a limited number of hours in the day and a limited amount of energy you can devote to any topic, so I choose not to learn about anything...

TypeScript, Minus TypeScript


Unless you’ve been hiding under a rock the last several years (and let’s face it, hiding under a rock sometimes feels like the right thing to do), you’ve probably heard of and likely used TypeScript. TypeScript is a syntactical superset of JavaScript that adds — as its name suggests — typing to...

Match Accented Letters with Regular Expressions


Regular expressions are used for a variety of tasks but the one I see most often is input validation. Names, dates, numbers…we tend to use regular expressions for everything, even when we probably shouldn’t. The most common syntax for checking alphabetic characters is A-z but what...

Expanding the Future (of Dev Tooling) with AI


Codota wants their tools to (at least!) double developer productivity. My vision is that we can do that not only by getting more developers using these tools, but in expanding where and how these tools learn themselves. The better the tools can *learn from us* what we're doing, the better *we...

Promise.allSettled


The Promise object has many useful functions like all, resolve, reject, and race — stuff we use all the time. One function that many don’t know about is Promise.allSettled, a function that fires when all promises in an array are settled, regardless of whether any of the promises...

A Lightweight Masonry Solution


Back in May, I learned about Firefox adding masonry to CSS grid. Masonry layouts are something I’ve been wanting to do on my own from scratch for a very long time, but have never known where to start. So, naturally, I checked the demo and then I had a lightbulb moment when I understood...

Collective #615


Primo * What the f*** is ...? * 3D Book Image CSS Generator * Event Delegation in JavaScript * CSS easing The post Collective #615 appeared first on Codrops

Vue 3.0 has entered Release Candidate stage!


Vue is in the process of a complete overhaul that rebuilds the popular JavaScript framework from the ground up. This has been going on the last couple of years and, at long last, the API and implementation of Vue 3 core are now stabilize. This is exciting for a number of reasons: Vue 3 promises...

What ya need there is a bit of templating


I had a fella write in to me the other day. He had some HTML, CSS, and JavaScript, and it just wasn’t behaving like he thought it ought to. The HTML had some placeholders in it and the JavaScript had some data in it, and the assumption was that the data would fill the placeholders. To those...

How to Make a Monthly Calendar With Real Data


Have you ever seen a calendar on a webpage and thought, how the heck did they did that? For something like that, it might be natural to reach for a plugin, or even an embedded Google Calendar, but it’s actually a lot more straightforward to make one than you might think and only requires...

Binding Arguments with Bind


One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace