Does Javascript have something like Ruby's method_missing feature? -


in ruby think can call method hasn't been defined , yet capture name of method called , processing of method @ runtime.

can javascript same kind of thing ?

the ruby feature explaining called "method_missing" http://rubylearning.com/satishtalim/ruby_method_missing.htm.

it's brand new feature present in browsers firefox (in spider monkey javascript engine). in spidermonkey it's called "__nosuchmethod__" https://developer.mozilla.org/en/javascript/reference/global_objects/object/nosuchmethod

please read article yehuda katz http://yehudakatz.com/2008/08/18/method_missing-in-javascript/ more details upcoming implementation.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -