ftlabs/ftdomdelegate — pull request #61 by lazd (2014-11-06 16:59:58+00:00)
Title: Support listening to events triggered directly on the window

### Changes

* `matchesRoot` has been modified to check if the element is equal to the `window`
* `matchesRoot` has been modified to check if the element is equal to `document.documentElement`
* This is a more cross-browser compatible way of implementing the check added by @matthew-andrews in 4f0eaa76c0fa14ff39c79daeb5f9dd7fa45e4885. I've left the previous commit intact for history's sake.
* `assert`/`refute` are explicitly declared now
* Existing tests were not passing due to both functions being `undefined`.
* This is related to #59, but does not fix it entirely as tests still will not pass in PhantomJS

### Testing

The following tests were added:
* Delegate instances on window catch events when bubbled from the body
* Delegate instances on window catch events when bubbled from the document
* Delegate instances on window catch events when bubbled from the element
* Delegate instances on window cause events when dispatched directly on window

Tests were ran against the following browsers and are passing

* Safari 7.0.6, OS X 10.9.5
* Chrome 38.0.2125.111, OS X 10.9.5
* Firefox 33.0, OS X 10.9.5
* IE 9.0, Windows 7 Enterprise x64