flatiron/director — pull request #137 by domenic (2012-08-25 01:54:16+00:00)
Title: Make it work in IE, almost completely

The last test fails in IE, and I don't think this can be avoided. Explanation below. But all the others are passing now, whereas before they got stuck on test 17/32.

Also included some cleanup commits.

---

Explanation for remaining failure:

Test 32 sets `window.location.hash` twice in a row, with no break in between. All browsers deliver hashchange events batched together at the end of the current turn. In non-IE browsers, this then looks like:

```
newURL = #/hash1
document.location.hash = #/hash2
thus inferredURL = #/hash1

newURL = #/hash2
document.location.hash = #/hash2
thus inferredURL = #/hash2
```

But in IE, which doesn't have the `newURL` property, this of course becomes

```
document.location.hash = #/hash2
thus inferredURL = #/hash2

document.location.hash = #/hash2
thus inferredURL = #/hash2
```

And so IE sees [hash2, hash2] where all the others see [hash1, hash2].