Releases: canjs/can-stache
portal() helper
This release introduces the portal helper. This is a helper that allows you to render HTML to somewhere else in the document.
For example, given this ViewModel:
const ViewModel = DefineMap.extend({
head: {
default: () => document.head
}
});
You can now render to the document.head within the template:
For more information, check out the portal helper docs.
bracket (ob[key]) infinite recursion fix
This Pull Request fixes a bug that would cause infinite recursion with bracket operators like:
{{let a = prop[ref]}} {{a}}
Literals work in magic tags
This works now {{0}}
.
Ordering of for/let/converters causing tests to fail
for
and let
are now created as part of builtInHelper
as they were being removed when __resetHelpers
was run and was causing lot's of failures when the order
I also moved most of helpers/converters
into core
, so that it can be created in the same way as helpers. So that when __resetHelpers
is run throughout tests all the helper
and converters
are added correctly and won't cause tests to fail due to missing helpers
.
fix for scope change in case when inside an #each
lazy evaluation and scope issue in partials
#632 Adds lazy evaluation in most scenarios. This will be most obvious in and()
and or()
helpers. For example, if this.foo
in {{#and( this.foo, this.bar )}}
is falsy
, this.bar
will never be evaluated.
Note that some expressions are evaluated no matter what. For example: foo[bar]
is evaluated no matter what and so is looking up the method in a call expression like foo(arg1, arg2)
.
#639 Fixes a scope issue in partials where the scope would change.
not using firstElementChild since it is not supported on fragments in IE11
filenames work in text sections
In a text section like: <div class='{{aValue}}'></div>
, the filenames were not working.
SVG rendering
Handle namespace attributes for svg #604