Is there a way to catch assignments to or reads from an undefined property in the Spider-Monkey Java
- by avri
The Spider-Monkey JavaScript engine implements the noSuchMethod callback function for JavaScript Objects.
This function is called whenever JavaScript tries to execute an undefined method of an Object.
I would like to set a callback function to an Object that will be called whenever an undefined property in the Object is accessed or assigned to.
I haven't found a noSuchProperty function implemented for JavaScript Objects and I am curios if there is any workaround that will achieve the same result.