I'm in a situation where I need to sort an array of objects by an attribute of the object, that attribute being a function reference. To do that, the simplest way was to do use the function reference as an object key like this:
function funky() {}
var someObject = {};
var key = {"func":funky, "some_other_stuff":5};
someObject[key.func] = key;
and it seems to work fine in the latest FF and chrome. Question is though - is this standard behavior? Can I expect this to keep working?