You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dom.Struct uses a Proxy object to intercept field gets, sets, and deletes. It also defines its own iterator logic to customize the behavior of for ... of loops, guaranteeing that programs will iterate over the expected key/value pairs.
However, dom.Struct does not override the behavior of for ... in loops (i.e. property enumeration). While these are not commonly used with Objects, they are used in the implementation of Object.entries(), which is more popular.
I believe we can achieve the desired effect by providing an implementation of the ownKeys trap.
The text was updated successfully, but these errors were encountered:
dom.Struct
uses aProxy
object to intercept fieldget
s,set
s, anddelete
s. It also defines its own iterator logic to customize the behavior offor ... of
loops, guaranteeing that programs will iterate over the expected key/value pairs.However,
dom.Struct
does not override the behavior offor ... in
loops (i.e. property enumeration). While these are not commonly used withObject
s, they are used in the implementation ofObject.entries()
, which is more popular.I believe we can achieve the desired effect by providing an implementation of the
ownKeys
trap.The text was updated successfully, but these errors were encountered: