Skip to content

Adds Map.prototype._legacyAttrBehavior

Choose a tag to compare

@justinbmeyer justinbmeyer released this 25 Jul 20:24
· 133 commits to master since this release

Fixes #111 and #112. Adds a _legacyAttrBehavior property, which when set to true, keeps can-map compatible with how it worked before can-reflect ( https://github.com/canjs/can-map/releases/tag/v3.2.0 ).

To use it, you can either:

// Sets the legacy behavior for all Maps
can.Map.prototype._legacyAttrBehavior = true
// Sets the legacy behavior for an individual map type
Type = can.Map.extend({ _legacyAttrBehavior: true}})
// Sets the legacy behavior for a single map instance
var map = new can.Map();
map._legacyAttrBehavior = true;