Extend the Web Forward « Katz Got Your Tongue?

Browser implementers are often wary of providing extension points that can be performance footguns. The biggest footgun is using libraries that rewrite the entire stack in JavaScript, and whole-stack-rewriting strategies are the tactic du jour today. For performance, we have little to lose and much to gain by making extensions more granular. via Extend the […]

Ben Alman » Multiple var statements in JavaScript, not superfluous

Ben Alman » Multiple var statements in JavaScript, not superfluous. I think I’m in denial about the potentials for major issues with combined var statements. I use the style because Crockford does, and I am irrationally likely to take what he says as gospel. This is a great dissection of the practice.

JavaScript Scoping and Hoisting

Adequately Good – JavaScript Scoping and Hoisting – by Ben Cherry. I was not aware at all of “hoisting” in JavaScript, which causes your variable declarations (but not initializations) to be rearranged to the top of your function scope by the interpreter. Function definitions, however, are hoisted along with the function body. Implications: potentially unexpected behavior […]

michigan.gov hates scrollwheels

Check out the State of Michigan website. It has the fun feature that when you scroll down the page, halfway through their little gallery thingy steals the scrollwheel focus and instead causes the gallery itself to start scrolling super fast. The page source makes it pretty clear that this is something that someone chose to do: $(document).ready(function() […]