background preloader


Facebook Twitter

Introduction to JavaScript Source Maps. Have you ever found yourself wishing you could keep your client-side code readable and more importantly debuggable even after you've combined and minified it, without impacting performance?

Introduction to JavaScript Source Maps

Well now you can through the magic of source maps. Basically it's a way to map a combined/minified file back to an unbuilt state. When you build for production, along with minifying and combining your JavaScript files, you generate a source map which holds information about your original files. When you query a certain line and column number in your generated JavaScript you can do a lookup in the source map which returns the original location. Developer tools (currently WebKit nightly builds, Google Chrome, or Firefox 23+) can parse the source map automatically and make it appear as though you're running unminified and uncombined files.

Demo: Get original location The above demo allows you to right click anywhere in the textarea containing the generated source. JSCapture. Contour Overview. A Tiny jQuery Element Creator. Welcome to the tutorial portion of Kreate!

A Tiny jQuery Element Creator

JS NICE: Statistical renaming, Type inference and Deobfuscation. Visual Event 2. Events in Javascript are often seen as a bit of an enigma.

Visual Event 2

A JavaScript survival guide. Are you a programmer who is considering learning JavaScript, but unsure whether it is worth the pain?

A JavaScript survival guide

Then this blog post is for you: I argue that it is worth it and give tips for surviving the language. Why learn JavaScript? The present The main reason for choosing JavaScript is the breadth of its ecosystem: the web platform, Node.js, JSON, NoSQL databases, Cordova/PhoneGap, automating PhotoShop and many other apps, etc.

Compared to Java, I like the interactivity of JavaScript and the web platform. I also like the flexibility of the language. The future. Bolshchikov/js-must-watch. jQAPI - Alternative jQuery Documentation Browser. Promise Pipelines in JavaScript - Promises, also know as deferreds or futures, are a wonderful abstraction for manipulating asynchronous actions.

Promise Pipelines in JavaScript -

Dojo has had Deferreds for some time. jQuery introduced its own Deferreds in version 1.5 based on the CommonJS Promises/A specification. Documentation. Moment(String, String); moment(String, String, String); moment(String, String, Boolean); moment(String, String, String, Boolean); If you know the format of an input string, you can use that to parse a moment. moment("12-25-1995", "MM-DD-YYYY"); The parser ignores non-alphanumeric characters, so both of the following will return the same thing. moment("12-25-1995", "MM-DD-YYYY"); moment("12\25\1995", "MM-DD-YYYY"); The parsing tokens are similar to the formatting tokens used in moment#format.


Year, month, and day tokens. Dbushell/Pikaday. Nnnick/Chart.js. Jstayton/jquery-marcopolo. jCanvas Docs. The <canvas> element is a new element apart of HTML5.

jCanvas Docs

It allows you to draw shapes, paths, images, and other drawings on a blank element called the canvas. Creating a canvas. Modernizr: the feature detection library for HTML5/CSS3. Function.apply and in JavaScript. In order to explain how the createDelegate function works in the last post, we have to understand JavaScript closures and Function.apply().

Function.apply and in JavaScript

The apply() method is the easiest subject to tackle, so we'll start there and work up. Every function in JavaScript has a number of attached methods, including toString(), call(), and apply(). How to measure the speed of JavaScript execution. If you're curious about the time it takes for your page to load and were wondering if there was something that could tell you what's going on besides human observation, then this excerpt from Even Faster Web Sites will get you pointed in the right direction.

How to measure the speed of JavaScript execution

The easiest, most straightforward, and probably least precise way to measure latency is via human observation; simply use the application on your target platforms and ensure that performance is adequate.


ColorBox, A jQuery Lightbox. A lightweight customizable lightbox plugin for jQuery Fork me on GitHub View Demos Download.

ColorBox, A jQuery Lightbox

Minifier. Sizing and Positioning Fancybox. Advanced Debugging With JavaScript. When used effectively, JavaScript debuggers help find and squash errors in your JavaScript code. jStorage - simple JavaScript plugin to store data locally. jQuery Events: Stop (Mis)Using Return False. Probably one of the first topics covered when you get started learning about jQuery events is the concept of canceling the browser’s default behavior. For instance, a beginner click tutorial may include this: This function toggles the hiding and displaying of #mydiv, then cancels the browser’s default behavior of visiting the href of the anchor tag.


Performance:Leak Tools. Strategy for finding leaks When trying to make a particular testcase not leak, I recommend focusing first on the largest object graphs (since these entrain many smaller objects), then on smaller reference-counted object graphs, and then on any remaining individual objects or small object graphs that don't entrain other objects. Because (1) large graphs of leaked objects tend to include some objects pointed to by global variables that confuse GC-based leak detectors, which can make leaks look smaller (as in bug 99180) or hide them completely and (2) large graphs of leaked objects tend to hide smaller ones, it's much better to go after the large graphs of leaks first.

A good general pattern for finding and fixing leaks is to start with a task that you want not to leak (for example, reading email). For example, start with bringing up the mail window and closing the window without doing anything. What leak tools do we have? Leak tools for large object graphs. Head JS. Extreme JavaScript optimization. 2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 20 This article is part of the 2009 performance advent calendar experiment.

JavaScript and HTML DOM Reference. Objektorientierte Programmierung in Javascript - Browsergame-Entwicklung -