vendredi 21 septembre 2018

How do I intercept and log all operations on an object?

How do I create a Proxy that unobtrusively logs and forwards all operations on an object or function? This includes the operations get, set, apply, construct, has, deleteProperty, and meta-operations like getOwnPropertyDescriptor, getPrototypeOf, setPrototypeOf, defineProperty, as well as anything else I didn't think of. Is this possible without explicitly defining the handler traps for all of these operations?





Aucun commentaire:

Enregistrer un commentaire