Releases: canjs/can-view-scope
Releases · canjs/can-view-scope
Remove dev-only comments for updating thisArg
v4.4.3 4.4.3
refactoring Scope.prototype.hasKey to avoid using getPathsForKey
Not removing scope.getPathsForKey in production
scope.getPathsForKey
should only be used in development-mode, but there is at least one thing using it in production, so leaving it in for now. Will remove it once this has been fixed.
#172.
adding support for scope.vm and scope.top
read returns parentHasKey data
var VM = DefineMap.extend({
foo: "string"
});
var vm = new VM();
var scope = new Scope(vm);
scope.read("foo").parentHasKey; // -> true
This also makes it so that getPathsForKey
will return back paths where the key returns a function.
not including notContext scopes in correct paths
implementing can.hasKey Symbol on Scope.prototype
Preventing errors in getPathsForKey when a context is not an object
Better alternatives for scope.root
This adds two new scope properties:
scope.vm
- the first context that is a viewModelscope.top
- the "top" context that is a viewModel
This also deprecates scope.root
in favor of these more explicit properties.
This release also adds scope.getPathsForKey
, which will be documented in a future release.