// From http://ejohn.org/blog/partial-functions-in-javascript/
Function.prototype.curry = function() {
var fn = this, args = Array.prototype.slice.call(arguments);
return function() {
return fn.apply(this, args.concat(
Array.prototype.slice.call(arguments)));
};
};
els = document.getElementsByTagName('li');
for(i=0; i < els.length; i++){
els[i].addEventListener('click', function(x){
alert(x);
}.curry(i), false);
}
Perhaps with the increasing awareness of this issue, Google will be forced to act.
[1] http://blog.cyberwar.nl/2011/05/google-profiles-exposes-mill...