0

I'm trying to create an url object using URL something like:

    var url = new URL($(location).attr('href'));
    url.searchParams.set('myFirstParam', myFirstParam);
    url.searchParams.set('mySecondParam', mySecondParam);

Everything working well, but according to URL Browser compatibility and Can I use the URL is not compatible with Internet Explorer.
Is there any alternative for URL compatible at least with IE11 ?

berramou
  • 1,099
  • 9
  • 11
  • 2
    The Resources tab on the caniuse page you linked to has a link to a polyfill, https://github.com/zloirock/core-js#url-and-urlsearchparams - does that not work for you? – Tieson T. Apr 03 '20 at 11:16
  • 1
    you can just use a polyfill: https://polyfill.io/v3/url-builder/ search for URL, download and include in your project. – ROOT Apr 03 '20 at 11:17

0 Answers0