Ben Nadel shares his implementation of Light and Dark modes using CSS custom properties, PostCSS transformations, and the MediaMatch JavaScript API.... ... more
Ben Nadel looks at how Windows Explorer previews Zip archive files, the problems that this can cause for the user, and how we can alert the user to potential issues using JavaScript and the location.href contents.... ... more
Ben Nadel and the crew talk with Shawn "swyx" Wang about his article, The Third Age of JavaScript, which outlines the past, present, and possible future of JavaScript and web development in general.... ... more
Ben Nadel attempts to guide the user through a Water Breathing exercises using JavaScript, jQuery, and CSS transitions in this fun little code kata.... ... more
Ben Nadel demonstrates how he adds tracking and analytics code to his AngularJS application using Function abstractions that reduce the amount of noise that necessarily litters his components and views.... ... more
Ben Nadel explores the use of the document.activeElement property to record and then subsequently restore focus using JavaScript in a modal window workflow.... ... more
Ben Nadel looks at how to programmatically keep focus within a container element (such as a modal window) using JavaScript when the user is employing keyboard-based Tab navigation and goes to tab-out-of the container element.... ... more
Ben Nadel asks for help in understanding the perspective that some React developers have in which they believe that React helps you learn "more JavaScript" when compared to other JavaScript frameworks.... ... more
Ben Nadel looks at capturing keyboard event modifiers across different operating systems in JavaScript; using the Command / Meta keys on MacOS and the Control key everywhere else.... ... more
Ben Nadel explores the interplay between HTML markup that was generated using HTML entities and the subsequent textContent representation of that markup in JavaScript.... ... more
Ben Nadel demonstrates how to insert text at the last known selection / caret location of an input using JavaScript. The big win here is understanding that inputs retain their selection properties even after losing focus.... ... more
Ben Nadel explores the rendering of Emoji glyphs from a given set of hexadecimal unicode codepoints using the String.fromCodePoint() prototype method in JavaScript.... ... more
Ben Nadel has started to create stronger separations between his "raw data" and his "derived data" in AngularJS 1.2.22. And, has found that using a JavaScript Object to index derived data makes rendering templates super simple.... ... more
Ben Nadel demonstrates that using the URL as the source-of-truth when implementing a search form in AngularJS 1.2.22 can create a more natural browsing experience for users.... ... more
Ben Nadel is experimenting with an approach to search that returns the search filters alongside the search results in Lucee CFML 5.3.7.47. This allows him to more easily manage the response in his client-side JavaScript.... ... more
Ben Nadel uses the :target CSS pseudo-class to conditionally show and hide elements when their id attribute matches the URL fragment / hash. This creates some rich, interactive behavior without the use of JavaScript or Angular.... ... more
Ben Nadel evolves his previous console.log() formatting demo, building a chainable, Chalk-inspired set of CSS stylers using JavaScript Proxies.... ... more
Ben Nadel experiments with lazy-loading a module into an AngularJS 1.6.7 application using the .loadNewModules() method. This allows new modules be added to the runtime injector after bootstrapping.... ... more
Ben Nadel shares the 300 lines-of-code that will eliminate all external date/time libraries in his AngularJS 1.2.22 applications. This covers formatting, adding, diffing, and calculating relative durations; and, is a translation of the same class in ... more
Ben Nadel looks at what happens when you define two cookies with conflicting names and different domain settings. And, how this presents in both JavaScript and Lucee CFML 5.3.6.61. It turns out, the first cookie wins.... ... more
Ben Nadel continues to noodle on the use of Boolean flags in ColdFusion and JavaScript; and how using named constants can bring some much appreciate clarity to otherwise complex code.... ... more
Ben Nadel explores the idea of using NPM run-scripts to invoke shell commands from Lucee CFML 5.3.6.61 with the help of the CFExecute tag. This allows for some flexibility that is not inherently available in ColdFusion's CFExecute tag.... ... more
Ben Nadel noodles on generating rich, server-side reports in Lucee CFML 5.3.6.61. This includes downloading images, rendering CFML as HTML, in-lining JavaScript and CSS, and creating ZIP archives.... ... more
Ben Nadel has noticed developers using the double-bang (!!) operator far more often in their JavaScript code than they have to. As such, he provides a series of unnecessary examples followed by cleaner, more intuitive examples.... ... more
Ben Nadel looks at the poor rendering performance of a large list view in AngularJS 1.2.22; how he identified some of the bottlenecks using Chrome's Performance Profiler; and what changes he made to vastly improve the rendering of the view.... ... more
Ben Nadel demonstrates (to himself) that the return value of an async / await function is implicitly wrapped in a Promise.resolve() call in JavaScript and TypeScript. And, that this will implicitly flatten the Promise chain as the return value is chained.... ... more
Ben Nadel favors the unary plus operator (+) over the parseInt() and parseFloat() methods in JavaScript when trying to coerce String values into Number values. It's short; fails more consistently; and maps closer to his intent.... ... more
Ben Nadel demonstrates that the CSS property, overscroll-behavior, can be used to trap the mouse scroll wheel within an overflow container. This can be used to prevent "scroll chaining", creating for a much better user experience (UX) with ... more
Ben Nadel creates a ColdFusion utility that compares LaunchDarkly feature flags (retrieved from the remote API) to his local CFML and JavaScript code, helping him to identify feature flags that are no longer relevant; and, which are just sitting there, ... more