I found this really nice one liner on Nick Desaulniers blog about Function.prototype.bind Edge Cases:
// var byId = function(id) { return document.getElementById(id); }
var byId = document.getElementById.bind(document);
Love it!
I found this really nice one liner on Nick Desaulniers blog about Function.prototype.bind Edge Cases:
// var byId = function(id) { return document.getElementById(id); }
var byId = document.getElementById.bind(document);
Love it!