Add implementation of 'includes' for PhantomJS

https://stackoverflow.com/a/31361163/429533
This commit is contained in:
Jace Browning 2018-05-31 12:46:31 -04:00 committed by Dave Hunt
parent d81d1563cb
commit 13a299f28f
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
if (!String.prototype.includes) {
String.prototype.includes = function() {'use strict';
return String.prototype.indexOf.apply(this, arguments) !== -1;
};
}
QUnit.module( 'module', {
beforeEach: function( assert ) {
init();