Membranes: filtering own properties, questions on ES7 intent
ajvincent at gmail.com
Tue Dec 13 08:26:58 UTC 2016
Hello, everyone. Now that the quarter at my local university is over,
I'm working on my es7-membrane project again. 
In implementing "filterOwnKeys", I realized I have wandered into a
couple of open questions, where I do not know from the ES7
specification what the desirable behavior is. I have written tests
for these two cases that I've discovered so far, but I currently have
them disabled. Hopefully this mailing list can provide me with some
The filterOwnKeys API is pretty much as it sounds: you name the
object graph and object you want filtering to apply to, and pass in an
array filtering function.
The first "unclear" testcase asks, "Reflect.defineOwnProperty(dry,
'blacklisted', desc) should return what?"  The question there is,
"should didSet be true because we set a value on the wet object graph,
or false because we failed to set a value on the dry object graph?"
The second "unclear" testcase examines "Deleting a blacklisted
property defined on the original target via the dry graph".  In
this case, defining the property worked (albeit invisibly to the dry
graph), but it's unclear if a delete operation on the property should
These questions, by the way, should be explicitly handled when the
membrane customer invokes other modification API's -
"requireLocalDelete" and "storeUnknownAsLocal", specifically. The
three modification API's, plus a "proxy creation observer" API, will
combine to form a practical whitelisting example. I am therefore
explicitly asking about what should the proxy API should do in an
otherwise perfect-mirror membrane implementation.
Advice, and debate, is most welcome!
Hayward, CA, U.S.A.
"The first step in confirming there is a bug in someone else's work is
confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001
More information about the es-discuss