polyfill
polyfill copied to clipboard
Support Node environment for url.js
Right now it's not possible to test (in Node env, Mocha for example) component which uses this URL polyfill because it fails on:
url.js:482
}(self));
^
ReferenceError: self is not defined
Make implementation more defensive?
}((function () {
try {
return Function('return this')() || (42, eval)('this');
} catch (e) {
return self;
}
})());