3

Is there a way to simulate Smalltalk's doesNotUnderstand or Ruby's method_missing in Javascript?

Daniel Vassallo
  • 337,827
  • 72
  • 505
  • 443
Richard Durr
  • 3,081
  • 3
  • 20
  • 26

1 Answers1

5

There is no catch-all method defined in the JavaScript standard, but Mozilla implements the non-standard __noSuchMethod__ for SpiderMonkey and Rhino (including Firefox obviously).

You may also be interested in checking out @CMS' answer given to the following Stack Overflow question:

Community
  • 1
  • 1
Daniel Vassallo
  • 337,827
  • 72
  • 505
  • 443