faux-jax-tulios
Version:
Fork using latest mitm for node 10 - Intercept and respond to requests in the browser (XMLHttpRequest, XDomainRequest) and Node.js (http(s) module)
12 lines (9 loc) • 299 B
JavaScript
var forEach = require('lodash-compat/collection/forEach');
var support = require('../support');
// https://xhr.spec.whatwg.org/#event-handlers
var events = module.exports = [];
forEach(support.xhr.events, function(isAvailable, eventName) {
if (isAvailable) {
events.push(eventName);
}
});