JavaScript Tutorials
JavaScript Feature Detection with has.js
Dojo Toolkit Project Lead Peter Higgins has been working on an exciting new project called has.js. Higgins describes this project best: Browser sniffing and feature inference are flawed techniques for detecting browser support in client side JavaScript. The goal of has.js is to provide a...
Smarter Script Loading with LABjs
We all know that asynchronous resource loading is the key to preventing unwanted and unnecessary blocking within the browser. There are many scripts/libraries available to help with async script loading but the ones that succeed are simple, compact, and reliable. Those words describe Kyle Simpson's LABjs...
WebSocket and Socket.IO
My favorite web technology is quickly becoming the WebSocket API. WebSocket provides a welcomed alternative to the AJAX technologies we've been making use of over the past few years. This new API provides a method to push messages from client to server efficiently...
JSON Validation with JSON Schema
It didn't take long for JSON to become the hottest thing since Pam Anderson slowly bounced her way down the BayWatch beaches. And why shouldn't it be? JSON is easy to understand visually, easy to parse on both the client and server sides, and...
Generate Dojo GFX Drawings from SVG Files
One of the most awesome parts of the Dojo / Dijit / DojoX family is the amazing GFX library. GFX lives within the dojox.gfx namespace and provides the foundation of Dojo's charting, drawing, and sketch libraries. GFX allows you to create vector graphics (SVG, VML...
HTML5’s window.postMessage API
One of the little known HTML5 APIs is the window.postMessage API.
window.postMessage
allows for sending data messages between two windows/frames across domains. Essentially window.postMessage acts as cross-domain AJAX without the server shims. Let's take a look at howwindow.postMessage
works and how you...Web Inspector and Firefox Dollar Functions
Many of you probably didn't know this but WebKit-based like Safari and Chrome, in addition to Firefox, contain special dollar functions within the console object that allow you to grab elements within the current page. While I've not determined the use of each method, a few...
JavaScript Copy to Clipboard with Branding
I published a post a year ago detailing how you can copy to the clipboard using JavaScript. The post was very popular and why would it be? Copying content from a webpage without needing to use the default browser functions is awesome. One trend I've...
Load MooTools Classes on Demand with RequireJS
RequireJS is a hugely popular JavaScript project right now thanks to what it does: asynchronously load JavaScript files and properly handle their introduction to a namespace flawlessly. Of course, callbacks are provided which allow you to work with the new code one it has been loaded.
JavaScript Events: Save the Bubbles!
The more we work with advanced, accessible, and crawlable web applications, the more control we need over element events. Mouseenter/leave events, keypress events, and the classic click event are probably the most-listened to events. Unfortunately many people, including myself, have been incorrectly handling event stoppage. In...