diff --git a/lighthouse-core/gather/driver.js b/lighthouse-core/gather/driver.js index c9d3b98d8918..ad218c159ab1 100644 --- a/lighthouse-core/gather/driver.js +++ b/lighthouse-core/gather/driver.js @@ -173,7 +173,7 @@ class Driver { * @param {string} scriptSource * @return {Promise} Identifier of the added script. */ - evaluteScriptOnNewDocument(scriptSource) { + evaluateScriptOnNewDocument(scriptSource) { return this.sendCommand('Page.addScriptToEvaluateOnLoad', { scriptSource, }); @@ -1064,7 +1064,7 @@ class Driver { * @return {Promise} */ async cacheNatives() { - await this.evaluteScriptOnNewDocument(`window.__nativePromise = Promise; + await this.evaluateScriptOnNewDocument(`window.__nativePromise = Promise; window.__nativeError = Error;`); } @@ -1074,7 +1074,7 @@ class Driver { */ async registerPerformanceObserver() { const scriptStr = `(${pageFunctions.registerPerformanceObserverInPage.toString()})()`; - await this.evaluteScriptOnNewDocument(scriptStr); + await this.evaluateScriptOnNewDocument(scriptStr); } /** diff --git a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js index bb3cb255ca47..80e5149cafad 100644 --- a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +++ b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js @@ -174,7 +174,7 @@ class TagsBlockingFirstPaint extends Gatherer { * @param {LH.Gatherer.PassContext} passContext */ beforePass(passContext) { - return passContext.driver.evaluteScriptOnNewDocument(`(${installMediaListener.toString()})()`); + return passContext.driver.evaluateScriptOnNewDocument(`(${installMediaListener.toString()})()`); } /**