Polyfill String.prototype.includes using core-js

See https://github.com/zloirock/core-js#ecmascript-6-string.
This commit is contained in:
Jonas Jenwald 2018-02-04 14:31:59 +01:00
parent d42541d26b
commit 9ac9ef8ef1

View File

@ -157,6 +157,15 @@ PDFJS.compatibilityChecked = true;
};
})();
// Provides support for String.prototype.includes in legacy browsers.
// Support: IE, Chrome<41
(function checkStringIncludes() {
if (String.prototype.includes) {
return;
}
String.prototype.includes = require('core-js/fn/string/includes');
})();
// Provides support for Array.prototype.includes in legacy browsers.
// Support: IE, Chrome<47
(function checkArrayIncludes() {