Open ajvincent opened 7 years ago
Another factor: .get() relies on both .getOwnPropertyDescriptor() and .getPrototypeOf(), so if .getOwnPropertyDescriptor() is disabled but .get() isn't, .get() should probably still work...
Side note: need to check that Reflect.anyMethod(proxy) doesn't pass through extra arguments.
Pushing out of 0.9 milestone: I think this is something that only experience with membranes can really define.
While working on documentation for the es7-membrane GUI, I realized the first trap, getPrototypeOf, is dangerous to disable. When disabled, an es7-membrane proxy trap simply throws when invoked. That's very bad for getPrototypeOf: it would be better to simply return null in that case.
Some traps, like .setPrototypeOf() and .defineProperty(), are safe to throw when disabled. Others need careful consideration.