Skip to content Skip to sidebar Skip to footer

Does JavaScript Have The Equivalent Of Python's __getattribute__?

Does JavaScript have the equivalent of Python's __getattribute__? In the sense that I'd like an object, a, for which a reference to a property x is equivalent to a.__get__('x'). Tr

Solution 1:

It is not possible for properties, though there is a non-standard way (__noSuchMethod__) for methods which is only available for Firefox.


Post a Comment for "Does JavaScript Have The Equivalent Of Python's __getattribute__?"