added support for XHR2 events.