startsWith not supported in IE

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Andreas
Posts: 9
Joined: Mon Dec 03, 2018 3:30 am

startsWith not supported in IE

Postby Andreas » Mon Jan 14, 2019 1:50 am

Hi Folks,

It looks like startsWith / String.prototype.startsWith is not supported by IE (all the way up to 11). When executing in other browsers, the call works fine. IE 11 results in error: "SCRIPT438: Object doesn't support property or method 'startsWith'".
Is this something you should include, say as a workaround for IE:

if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position) {
position = position || 0;
return this.indexOf(searchString, position) === position;
};
}

Thanks,
Andreas

Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron