JavaScript Tutorials
Permissions API
Many of the functionalities that we're translated from mobile to the web require permission from the user. Think about geolocation, audio/video access (think getUserMedia for camera access), and likewise APIs. We can probably all agree that requiring permission for access to these APIs is a good thing, but I see a...
Step-By-Step Guide to Stripe Payments in React
This is an adapted from several excerpts from Scott Hasbrouck's book, "The Node.js Engineer's Guide to Stripe" - Available Now! with a 10% discount for David Walsh readers with code: WALSH10 What We’ll Cover Replace Checkout.js with Stripe.js Removing the Checkout.js button Adding required...
can-zone
can-zone is a library that implements Zones. Zones are an abstraction allowing you to write cleaner code for a variety of purposes, including implementing server-side rendered (SSR) applications, profiling, more useful stack traces for debugging, or a clean way to implement dirty checking. This article will...
React Authentication is Easy with Auth0
There are a lot of great tools out there for creating modern apps that can often make our lives easier, but one aspect that is often tricky and time-consuming is authentication. The landscape around building applications today is different than it used to be, which can...
console.time & console.timeEnd
The
console.time
andconsole.timeEnd
methods allow developers to time any routine and get a duration in milliseconds. Since JavaScript performance is becoming increasingly important, it's good to know basic techniques for benchmarking routines. One of the most basic benchmarking tools isconsole.time
withconsole.timeEnd
.console.time
starts the time andconsole.timeEnd
stops the timer and...Web Audio API
The Web Audio API allows developers to load and decode audio on demand using JavaScript. The more I evaluate awesome games for Firefox OS TVs, the more I get to learn about these APIs that I normally wouldn't touch. The following is a very basic introduction to the WebAudio API...
Docco: Quick JavaScript Documentation
Docco is a free Node.js-powered JavaScript documentation generation tool. I was never big into documenting JavaScript methods within the source files themselves, but my team made the decision to go that route for a new project and I've come full swing. Pair the in-source documentation with the...
Mozilla, Web Virtual Reality, and A-Frame
I was fortunate enough to make Game Developer Conference this year and the big story was virtual reality. Hell, you couldn't go five feet without seeing someone pitching their VR hardware, software, or likewise technology. They were all proprietary solutions, including Oculus, Epic Games, and so on. You...
Spatial Navigation
Spatial navigation is the ability to navigate to focusable elements based on their position in a given space. Spatial navigation is a must when your site or app must respond to arrow keys, a perfect example being a television with directional pad remote. Firefox OS TV apps are simply...
Object.keys
I adore JavaScript objects. Love them. You're probably asking "well, why don't you marry them?" Trust me: if I could, I would. Arrays are nice and all but object keys provide another level of structure and information that is invaluable. For example, it's much faster search an object...