Deprecation Notice: Microsoft Internet Explorer 11 (IE11) reached end-of-life on June 15, 2022. This article is retained for historical reference for customers on legacy implementations. For current Salesforce deployments, use a modern, supported browser.
When using Internet Explorer 11, you may see the following error message in the browser console:
"[Object doesn't support property or method 'startsWith']"
This error is caused by the use of the JavaScript String.prototype.startsWith() method in the Salesforce Aura framework. The startsWith() method is a standard ECMAScript 6 (ES6) string method that is not supported in IE11.
The simplest and recommended resolution is to use a modern browser that natively supports the startsWith() method:
All modern browsers support ES6 string methods including startsWith(), endsWith(), and includes() without any additional configuration. Salesforce's supported browser list does not include IE11.
If migrating away from IE11 is not immediately possible, a JavaScript polyfill can be used to add startsWith() support to IE11.
The polyfill works by checking whether String.prototype.startsWith is already defined. If it is not (as is the case in IE11), the polyfill defines it as a function that extracts a substring starting at the specified position and compares it to the search string.
To use this polyfill in Salesforce:
A more robust community polyfill (mathiasbynens/String.prototype.startsWith) is also available on GitHub and can be used as a Static Resource.
(See polyfill code example)
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
return this.substr(position || 0, searchString.length) === searchString;
};
}000381505

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.