JavaScript Articles
-
Helping web developers with JavaScript errors
Errors are one of the more frustrating things you encounter while programming. Those little messages in the console can ruin your entire afternoon, day, or week. When “undefined is not a function” appears yet again, it’s often time to get another coffee. Even if you use the one true JavaScript exception handler, and have a […]
-
A Taste of JavaScript’s New Parallel Primitives
Author’s note: Since this post was written, the API of postMessage has changed slightly. When sending a SharedArrayBuffer with postMessage, the buffer should no longer be in the transfer list argument of the postMessage call. Thus, if sab is a SharedArrayBuffer object and w is a worker, w.postMessage(sab) sends the buffer to the worker. You […]
-
Building Cardboard Dungeon With A-Frame
Cardboard Dungeon is a web-based dungeon-crawling experience designed for use with Google Cardboard and written using Mozilla’s virtual reality framework, A-Frame. In this case study, I’ll discuss the key challenges I faced during the development of Cardboard Dungeon, my experiences with A-Frame, and some of the lessons I learned whilst approaching virtual reality for the […]
-
Web Push Arrives in Firefox 44
Updated, 2016-02-20: The Push service now requires an explicit “TTL” header on requests to an endpoint. The article has been updated to reflect this. More details on the Mozilla Services Blog. Have you ever wished that a website could notify you when something important happened, even if you didn’t have the site open? Maybe you’ve […]
-
Firefox and the Web Speech API
Speech Synthesis and recognition are powerful tools to have available on computers, and they have become quite widespread in this modern age — look at tools like Cortana, Dictation and Siri on popular modern OSes, and accessibility tools like screenreaders. But what about the Web? To be able to issue voice commands directly to a […]
-
Bringing the Power of SIMD.js to gl-matrix
Background: SIMD.js Single-Instruction-Multiple-Data (SIMD) is a technique used in modern processors to exploit data level parallelism. SIMD introduces wide vectors that can hold multiple data elements. Once loaded, all of the vector’s elements can be processed simultaneously using one vector operation. This brings the advantages of better performance and energy efficiency. The parallelism offered by […]
-
Better than Gzip Compression with Brotli
HTTP Compression Brotli is an open source data compression library formally specified by IETF draft. It can be used to compress HTTPS responses sent to a browser, in place of gzip or deflate. Support for Brotli content encoding has recently landed and is now testable in Firefox Developer Edition (Firefox 44). In this post, we’ll […]
-
Flash-Free Clipboard for the Web
As part of our effort to grow the Web platform and make it accessible to new devices, we are trying to reduce the Web’s dependence on Flash. As part of that effort, we are standardizing and exposing useful features which are currently only available to Flash to the entirety of the Web platform. One of […]
-
ES6 In Depth: The Future
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. Last week’s article on ES6 modules wrapped up a 4-month survey of the major new features in ES6. This post covers over a dozen more new features that […]
-
ES6 In Depth: Modules
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. When I started on Mozilla’s JavaScript team back in 2007, the joke was that the length of a typical JavaScript program was one line. This was two years […]