I am reporting a error when using the new knockout-2.0.0.js release
with Steve Sandersons Full-height app layout series.
http://blog.stevensanderson.com/2011/11/04/full-height-app-layouts-navigation-and-history/
I am not sure if this is a bug with the final release or just
something that changed in the final release, since his code was
originally using knockout-1.3.0beta.js, but I thought you might like
to know that the new knockout-2.0.0.js release crashes his sample.
What I see in the VS2010 debugger is that at line 1893 of
knockout-2.0.0.debug.js after clicking on Places -> America's to
transition to the children pane of the sample that VS2010 reports
"Microsoft JScript runtime error: Unable to get value of the property
'nodeType': object is null or undefined".
Here is the code in question.
// Retrieving binding context from arbitrary nodes
ko.contextFor = function(node) {
// We can only do something meaningful for elements and
comment nodes (in particular, not text nodes, as IE can't store
domdata for them)
switch (node.nodeType) {
case 1:
case 8:
var context = ko.storedBindingContextForNode(node);
if (context) return context;
if (node.parentNode) return
ko.contextFor(node.parentNode);
break;
}
Thanks,
Anthony