inexorabletash/polyfill

Support Node environment for url.js

lexaurin opened this issue · 1 comments

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;
  }
})());