With string templates, if the HTML is invalid in some way, the browser will attempt to fix it, often by removing invalid elements. If that invalid element has a binding, Knockout still tries to do that binding on whichever element is after it.
We fixed a particular consequence of this in #660, but should probably fix the problem more generally. Likely this will mean that we track the tagName of the binding's element and ensure that the binding is applied to an element with the same name.
Prevent binding to missing nodes in case of malformed template (#814)
Reverts change from 8bb9b39 that worked around a specific instance of this problem.
The reason for removing text node support - is it just that KO now only ever passes elements (not text nodes) to setTextContent?
That is, the only case where previously we might pass a text node was when a template markup was malformed and a text binding was being applied incorrectly to a text node instead of the intended element?
Actually, ignore this question. After re-reading the notes for #660, it's pretty clear why you did this (i.e., it's exactly as I described above). And the existing spec Should not throw errors if trying to apply text to a non-rendered node covers the new behavior.
Should not throw errors if trying to apply text to a non-rendered node
Looks good - thanks!