svaarala / duktape

Duktape - embeddable Javascript engine with a focus on portability and compact footprint
MIT License
5.96k stars 516 forks source link

Rethink DUK_ENUM_NO_PROXY_BEHAVIOR flag #1724

Open svaarala opened 7 years ago

svaarala commented 7 years ago

In Duktape 2.2 Proxy objects have an internal duk_hproxy structure and the target/handler properties are no longer visible as hidden Symbols on the proxy. As a result, duk_enum() with DUK_ENUM_NO_PROXY_BEHAVIOR always returns an empty object when the target is a Proxy. This may be useful if one simply wants to avoid Proxy side effects when enumerating, but:

svaarala commented 7 years ago

Some related discussion in https://github.com/svaarala/duktape/issues/1592#issuecomment-328233511.