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’)};
t.src=”http://www.cisco.com/web/fw/i/logo.gif”;
does not work
Image.prototype.onload = function(){alert(’yes’)};
var t = new Image();
t.src=”http://www.cisco.com/web/fw/i/logo.gif”;
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
thingdb
episodes and boomerang for event based performance metrics
understanding git
stanford encyclopedia of philosophy
long now seminars
baen cds

ie6 memories

http://mrdoob.com/lab/javascript/effects/ie6/

js1k contest entry

Here’s my entry into the 1k contest:
http://js1k.com/demo/754
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:
http://github.com/facetcounter/bubble1k.js
Here’s a bookmarklet so you can destroy any page!

AtomPub

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.
AtomPub

dragdealer

drag dealer does drag and drop, iPhone compatible…
http://code.ovidiu.ch/dragdealer/

CORS

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: http://www.w3.org/TR/cors/
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 [...]

processing.js

It’s the processing API ported to javascript and implemented in canvas.  Let the fun begin.
http://processingjs.org/

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

http://code.google.com/p/zen-coding/
*3 means repeat 3 times
$ means “insert iteration number here”
div#thing>ul*3>li#it-$*3>a+
table>tr*2>td*3>table+