Can't set “apply” trap to Proxy object
I created a Proxy object with an "apply" trap: var target = {}, handler = { apply: () => 42 } proxy = new Proxy(target, handler); Therefore, the Proxy object should be callable. However, it doesn't work: proxy(); // TypeError: proxy is not a function Why? According to the definition of the [[Call]] internal method of Proxy objects it should work: Let trap be GetMethod ( handler , "apply" ). Return Call ( trap , handler , « target , thisArgument , CreateArrayFromList ( argumentsList )»). However, there is a problem: not all Proxy objects have the [[Call]] method: A Proxy exotic object only has