Skip to content

Commit

Permalink
polyfill for IE 11
Browse files Browse the repository at this point in the history
  • Loading branch information
denshade committed Jan 15, 2020
1 parent 392872c commit 799bca5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imagemapfunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};

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

// Production steps of ECMA-262, Edition 6, 22.1.2.1
if (!Array.from) {
Array.from = (function () {
Expand Down

0 comments on commit 799bca5

Please sign in to comment.