knockout/knockout — pull request #1162 by SteveSanderson (2013-10-24 12:02:25+00:00)
Title: ko.renderTemplate doesn't work with documentFragments in ko 3.0.0rc in IE8 anymore, throws 'SCRIPT16386 no such interface supported' in new version of domNodeIsContainedBy method

after updating to knockout 3.0.0rc, I can't use ```js ko.renderTemplate(name, bindingContext, {}, element)``` with element being a documentFragment created by ```document.createDocumentFragment()``` anymore in IE8, because an exception 'SCRIPT16386 no such interface supported' is thrown within domNodeIsContainedBy() on the line ```return containedByNode.contains(node.nodeType === 3 ? node.parentNode : node);```` since 3.0.0rc.

This problem doesn't exist in ko 2.3.0.

Either
* commenting out the newly introduced
```
if (containedByNode.contains)
return containedByNode.contains(node.nodeType === 3 ? node.parentNode : node);
```
from domNodeIsContainedBy(), or
* adding another case
```
if (node.nodeType === 11) return false;``` before ``` if (containedByNode.contains)...```
(nodeType 11 means 'documentFragment', which is never inserted into a document and therefore can be considered "floating-free", see http://stackoverflow.com/a/2620223)

solved the problem. I don't know the details of domNodeIsContainedBy() or why it has been extended with the ```if (containedByNode.contains)...``` case, but either one or the other of the above two solutions are needed to support rendering to documentFragments in IE8 again.