Proxy Reflect.has() call causes infinite recursion? (#!/JoePea)

Alex Vincent ajvincent at gmail.com
Thu Nov 21 23:12:21 UTC 2019


I'm afraid your testcase is still far too complicated to really figure out
at first glance.  It looks like you're trying to implement a mixin pattern.

In my experience, it's better to implement the getPrototypeOf,
getOwnPropertyDescriptor, and defineProperty traps, and maybe make your
get, set, and has traps depend on them.

Yes, that means you have to read the ECMAScript specification, section 9.5
carefully.  Yes, it's a major pain point.  I can only point you to my own
efforts in es-membrane to implement the specified traps.

https://github.com/ajvincent/es-membrane/blob/master/source/ObjectGraphHandler.js
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20191121/cb75697a/attachment-0001.html>


More information about the es-discuss mailing list