Dojo compatibility

Hi,

While trying to test a project in Dojo, I ran into some trouble when faking xhrs.

1) Dojo's xhr wrapper doesn't check for a null event parameter in its callbacks, so I added an empty object to the callback.apply [line 207]

2) Dojo calls removeEventListener with a modified context, which throws a TypeError: Illegal invocation. Faking this function solves the issue.


Cheers,
Jeremy