Skip to content

{ Category Archives } javascript

prototypes in javascript for image onload handlers

All this was trying to get it so all subsequent images created in a document would have a onload handler already setup (yes you guessed it I was trying to spy on a metrics library).
This works:
var t = new Image();
t.onload = function(){alert(’yes’)};
does not work
Image.prototype.onload = function(){alert(’yes’)};
var t = new Image();
this works in that you get [...]

flowchart: which social answer site is right for you?
tunisian government injects JS into facebook pages
solve a puzzle, get hired by facebook? and facebook’s arcitecture
simple JS module patterns
episodes and boomerang for event based performance metrics
understanding git
stanford encyclopedia of philosophy
long now seminars
baen cds

ie6 memories

js1k contest entry

Here’s my entry into the 1k contest:
It made me really appreciate the other entries (most of which are much more complex than mine).
Compression-by-hand is a fine art, which I’ve probably had enough of for a while now.
Here’s the code on github:
Here’s a bookmarklet so you can destroy any page!


I need to see if I can start using this to standardize how some of the simpler web services structure their output.  RSS has sometimes ended up being a default way of representing a list of things because it’s well defined and makes an easy point of agreement.


drag dealer does drag and drop, iPhone compatible…


Cross origin resource sharing is a browser standard that lets you get around the script tag or iframe hacks for accessing web service content hosted on another domain.
Here’s the spec:
Firefox and webkit browsers switch to CORS anytime you ask for an XHR to another domain, but the XHR interface is the same.  IE8 has [...]


It’s the processing API ported to javascript and implemented in canvas.  Let the fun begin.

js unit testing follow up

I admit to being one of those people who has scratched their heads and said “javascript? How do you test it?”  What that meant to me, of course was “how do you automate testing?”
Certainly as my client side code has increased in complexity, I’ve moved towards more structured and repeatable ad hoc testing, driven by [...]

css-like selectors to create html
*3 means repeat 3 times
$ means “insert iteration number here”