I have a Javascript file where code is written in Javascript ES6 standards.The file is working fine in chrome but its not working in IE. After doing logs, I found out issue is in making ajax calls. Following code is where I am trying to make calls:
var response = await fetch(url, xhrRequestObject);
if (response.ok) {
var jsonResponse = await response.json();
return jsonResponse;
}
I googled through and found some polyfills to rectify this issue.But I am not getting how to use these polyfills inpure javascript file.
Any suggestions on how to use these polyfills in a pure js file ?