collin/knead — pull request #1 by audionerd (2013-04-18 20:57:11+00:00)
Title: 'HTMLDocument is undefined' in IE9

In IE9, this line triggers "HTMLDocument is undefined":

```coffee
unless _document instanceof HTMLDocument
```

https://github.com/collin/knead/blob/master/src/knead.coffee#L43

IE9 expects `Document` instead of `HTMLDocument`.

This worked for us:

```coffee
# IE9 only understands Document
klass = if (typeof Document != 'undefined') then Document else HTMLDocument
unless _document instanceof klass
```

Fair warning: I didn't test this very thoroughly, and I didn't test in an IFRAME.