Browse Source

DIV-604: Adding startsWith prototype to string function when not present in case code is run in IE11 because it does not have support for the String.startsWith

pull/160/head
Benard Ebinu 8 years ago
parent
commit
ee0f62beff
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      edivorce/apps/core/static/js/functions.js

+ 9
- 0
edivorce/apps/core/static/js/functions.js View File

@ -1,3 +1,12 @@
// Internet Explorer 11 implementation of String does not have the startsWith function
// so manually add it to prevent an error on load.
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
position = position || 0;
return this.substr(position, searchString.length) === searchString;
};
}
// Show or Hide Information Section
// Using following data attributes:
// data-target_id: id of information section


Loading…
Cancel
Save