mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Polyfill String.prototype.includes
using core-js
See https://github.com/zloirock/core-js#ecmascript-6-string.
This commit is contained in:
parent
d42541d26b
commit
9ac9ef8ef1
1 changed files with 9 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue