For exemple this:

for(i=0;A=$$("*")[i++];)"solid hsl("+(A+A).length*9+",99%,50%)1px"

will outline all elements with a 1px line in a color depending on the type of the element (provided you have the $$ alias to document.querySelectorAll).

Here is a CSS debugger bookmarklet for your convenience.


FT Labs introduces an auto-polyfill library:

Short version: drop this in the <head> of your HTML:

<script src="//"></script>

and your browser has (basic/poyfillable) support for a lot of modern features. You can also specify which feature you want…


Bjorn Tipling on javascript regexes. Some nice reminders, notably about state in regex objects and performance.



Nice in-depth explanation of JavaScript prototypes and inheritance, with a visualization of customizable code.

Also check out augment, “The world’s smallest and fastest classical JavaScript inheritance pattern” (via @roparz).

Tags: javascript oop

Examples of how to do common event, element, ajax and utility operations with plain javascript.

Nice reference. Includes a selector with the earliest version of Internet Explorer you need to support.


Progressive enhancement has never been about users who’ve turned JavaScript off, or least it wasn’t for me.
Christian Heilmann re-purposes a Mitch Hedberg observation to relate to progressive enhancement. Basically, when an elevator fails, it’s useless. When an escalator fails, it becomes stairs. We should be building escalators, not elevators.
Given the diversity of user agents, your JS failing isn’t an edge case. Sometimes it’ll be the browser’s fault, sometimes yours.


Nicholas C. Zakas on the blind client-side-everything trend.


Regex: Emulate Atomic Grouping (and Possessive Quantifiers) with LookAhead

Some regex flavors (like JavaScript’s) do not support Atomic Grouping (nor possessive quantifiers), but fully support LookAhead. It can be annoying when atomic grouping usually improves performance and helps preventing catastrophic backtracking that would cause exponential matching time.

Fortunately, you can emulate atomic grouping with LookAhead. (?>a) becomes (?=(a))\1. It works by matching (and capturing) the sub-expression in a LookAhead non character-consuming assertion, then matching it (effectively consuming the characters) with a backreference, not allowing backtracking at this point.

As possessive quantifiers like a++ have a strict equivalent using atomic grouping (here (?>a+)), we can also leverage this technique: a++ becomes (?=(a+))\1.

There are two downsides though: it complexifies the regex and it inserts a possibly unwanted capturing group for the sole purpose of matching. But still, it may still be a useful trick to know since the JS regex flavor is a bit sub-par.

On a side note, REL implements this behavior when converting a regex for the JavaScript flavor.


Nobody seems to be happy, nobody seems to understand it … everyone is trying to change it, pretending to make it better … and again, nobody seems to realize it has been here since ever, it has been working in any field, it does everything, and it keeps getting faster!

On a related note, see All Right, Gentlemen!.



Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind. It’s a spin-off from Dabblet and is tested there daily by thousands.