I need to override the length property of the Function constructor for a 
wrapper I am making. Why does the following code work in Gecko and Mazilla 
browsers but not nodejs?

var f = function(a,b,c) {}
f.length // = 3 <- length is three because 3 parameters are expected by the 
function

f.__defineGetter__("length", function() { return 5 })
f.length // = 5 <- length is now five because f __proto__.length has been 
overwritten with a property

The above code works in the latest Chrome and Firefox but not in Nodejs, i 
wonder why..

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/69167b38-05f7-48c0-9755-602bb3a75b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to