Just a brief note that Knockout 2.3.0 is now available. Additionally, there is a beta release of Knockout 3.0.0 available here. Steve Sanderson has a great post highlighting the features/fixes in 2.3.0 and the changes in 3.0.0 beta. I look forward to writing more about 3.0 changes in the coming months.
2.3.0 contains a ton of fixes and improvements. Here is a copy of the 2.3.0 release notes:
Features:
hasfocus
renamed tohasFocus
(hasfocus
will still continue to work as well)name
parameter oftemplate
can accept an observableko.unwrap
added as substitute forko.utils.unwrapObservable
options
binding uses same technique asforeach
to avoid unnecessary re-renderingoptionsAfterRender
callback added to allow for custom processing of the added optionsoptionsCaption
will display a blank caption if the value is an empty string
Bugs fixed:
hasfocus
: requires two Tab presses to blur (and related issues) in Chrome; throws error in IE9 on initial binding- Error when you try to inline knockout because of
</script>
string - If first node in string template has a binding, the bindings in the template won’t get updated
selectedOptions
doesn’t update non-observable propertiescss
won’t accept class names with special characters- Applying binding twice to the same nodes fails in strange ways (now it fails with an obvious error message)
- Two-way bindings overwrite a read-only computed property with a plain value
- Empty template throws an error with jQuery 1.8+
observableArray
can be initialized with non-array values- Event binding init fails if
Object.prototype
is extended (fixed allfor...in
loops) - Calling
ko.isSubscribable
withnull
orundefined
causes an error - Binding to
null
orundefined
causes an error - Memory leak in IE 7, 8 and 9 from event handlers
options
binding causes error in IE8+ in compatibility modevalue
binding onselect
doesn’t matchnull
with caption option- Invalid element in string template can cause a binding error
- Conditionally included select gets close to zero width in IE7-8
ko.toJS
treats Number, String and Boolean instances as objectsvalue
binding misses some updates (1
->"+1"
)- Exception in
ko.computed
read function kills the computed - Error if spaces around
=
indata-bind
attribute in string template
Maintenance:
- Port tests to Jasmine
- Support Node.js
- Remove build output files and Windows build scripts
- Build script runs tests using build output (using PhantomJS and Node.js)
- Use faster string
trim
function - Add automated multi-browser testing using Testling-CI