DoesNotUnderstand for JavaScript?

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

+3
source share
1 answer

There is no catch-all method in the JavaScript standard, but Mozilla implements a custom one __noSuchMethod__for SpiderMonkey and Rhino (including Firefox).

You may also be interested in checking @CMS 'answer to the following stack overflow question:

+5
source

Source: https://habr.com/ru/post/1769237/


All Articles