Sometimes we try to set properties directly in dbjs via obj.foo = 'bar', but if property of given name was never defined in dbjs (on any object), then it doesn't reach dbjs getter but becomes natural ECMAScript property set.
This behavior leads to issues, as our settings may get lost, when we do not expect it.
It might be good to try to find possibly dev only solution that would warn us about such usage (or even throw). It might be possible in ES6 with usage of proxies, or with Object.observe if V8 implements it.
/cc @kamsi @mtuchowski
Sometimes we try to set properties directly in dbjs via
obj.foo = 'bar'
, but if property of given name was never defined in dbjs (on any object), then it doesn't reach dbjs getter but becomes natural ECMAScript property set.This behavior leads to issues, as our settings may get lost, when we do not expect it.
It might be good to try to find possibly dev only solution that would warn us about such usage (or even throw). It might be possible in ES6 with usage of proxies, or with
Object.observe
if V8 implements it.