[Harmony proxies] "if a trap is missing"

David Bruant bruant.d at gmail.com
Tue Dec 6 14:13:42 PST 2011


"All traps are optional. If missing (more precisely, if
handler[trapName] returns undefined), the proxy defaults to forwarding
the intercepted operation to its target object." [1]

Proxy({}, {get:undefined}).someProperty;

In this case, the description says that the operation is forwarded. I
would prefer a TypeError to be thrown in this case.



[1] http://wiki.ecmascript.org/doku.php?id=harmony:direct_proxies

More information about the es-discuss mailing list