Any idea why it isn't spamming the console? I mean, if it is
recursive, shouldn't it fire my console.logs over and over, like
50,000 times, before finally throwing the error?

On Thu, Nov 21, 2019 at 3:12 PM Alex Vincent <[email protected]> wrote:
>
> 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
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to