It seems unlikely that I found some glaring cross-browser error. But according to Reflect.set documents, Reflect.set supposed to use the 4th parameter as thisArg (for example, if the given variable is a setter). The first argument is the object whose value must be set, but whenever I put an object as the 4th argument, the value is set to it instead of the target object.
var target = new Object; var thisArg = new Object; Reflect.set(target, 'variable', 52, thisArg); target.variable == undefined thisArg.variable == 52
Any explanation?
source share