
A visualizer to help you learn how the DOM Event system works through exploration. Explore event phases, stopping events, canceling events, passive events and more. Explore DOM Events →
A rather geeky/technical weblog, est. 2001, by Bramus
Christoph Nakazawa, former Engineering Management at Facebook and now Front End Engineer at Stripe, is writing a series about JavaScript infrastructure. In this second part of this still in progress series he digs into eliminating the ongoing need for installing dependencies from the development iteration cycle. I provide recommendations that I personally implemented and have …
For all your working-with-layers-on-<canvas> needs: Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more. You can draw things onto the stage, add event listeners to them, move them, scale them, and rotate them independently from other …
Continue reading “Konva.js — HTML5 Canvas JavaScript framework”
parseInt()
in JavaScriptDmitri Pavlutin digs into why parseInt(0.0000005); evaluates to 5: parseInt(0.5); // => 0 parseInt(0.05); // => 0 parseInt(0.005); // => 0 parseInt(0.0005); // => 0 parseInt(0.00005); // => 0 parseInt(0.000005); // => 0 parseInt(0.0000005); // => 5 🤯 Solving a Mystery Behavior of parseInt() in JavaScript → On a related note, Yannick Clybouw recently hit …
Continue reading “Solving a Mystery Behavior of parseInt()
in JavaScript”
IntersectionObserver
Jonathan Neal dissects the Islands Architecture approach behind Astro. During the presentation, Fred demonstrates dynamically loading JS using “Islands Architecture”,a strategy where small HTML placeholders are progressively upgraded with dynamic or interactive content as-needed. The demonstration involves waiting on the viewport visibility of a div placeholder before loading some JS. Using an IIFE an IntersectionObserver …
Continue reading “Lazy loading JavaScript using IntersectionObserver
“
In JavaScript one of the most important data types is Object. Sometimes we want to have more control over certain objects, such as being able to listen to who is reading the object property or updating. One of the best ways to control an object is with a Proxy. You can do a lot of …
Continue reading “A Beginner’s Guide To Proxies in JavaScript”
Andrea Giammarchi: After reading yet another blog post about JS classes being “just sugar for prototypal inheritance”, I’ve decided to write this post to help clarifying, one more time, why this statement is misleading; a post that hopefully explains what’s the difference and why it matters to understand it. I also used to say this …
Continue reading “JavaScript Classes are not “just syntactic sugar””
Oleksii Trekhleb has implemented the Seam Carving algorithm in JavaScript. With this article I want to do three things: Provide you with an interactive content-aware resizer so that you could play around with resizing your own images Explain the idea behind the Seam Carving algorithm Explain the dynamic programming approach to implement the algorithm (we’ll …
Continue reading “Seam carving: content-aware image resizing … in JavaScript”
Anyone who has worked with dates and time in JavaScript knows how broken the built-in Date is. In the near future we’ll be able to use Temporal instead, an ECMAScript feature currently at Stage-3 Nathan Sebhastian has a good overview on how it compares to Date, along with some practical examples. The new Temporal API …
Continue reading “JavaScript Temporal API — A Fix for the Date API”