canjs / can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
https://canjs.com/doc/can-connect.html
MIT License
29 stars 16 forks source link

move connection options to bottom-most link in prototype chain #327

Open nlundquist opened 7 years ago

nlundquist commented 7 years ago

Likely implemented as part of #304.

Currently can-connect connection options are stored in the top-most object in the connection prototype chain. This is somewhat unintuitive since options are subject to being hidden by properties on behaviors since they are lower on the prototype chain. Relatedly the options object would be a good place to store connection-specific overrides of behavior methods but this currently can't be done because the behavior will always be lower on the proto chain than the options.

justinbmeyer commented 6 years ago

This might be worth changing for 5.0. options should overwrite everything ... possibly be both "on top" and "on bottom" at the same time...