chrome-page-eval
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -96,3 +96,3 @@ 'use strict' | ||
const browserlog = (m) => { | ||
const browserLog = (m) => { | ||
debugMe(`message from console: ${m}`) | ||
@@ -160,3 +160,3 @@ } | ||
page.once('error', reject) | ||
page.on('console', browserlog) | ||
page.on('console', browserLog) | ||
@@ -198,3 +198,3 @@ await page.goto( | ||
page.once('error', reject) | ||
page.on('console', browserlog) | ||
page.on('console', browserLog) | ||
} | ||
@@ -251,4 +251,4 @@ | ||
if (page) { | ||
page.removeListener('error', reject) | ||
page.removeListener('console', browserlog) | ||
removeListener(page, 'error', reject) | ||
removeListener(page, 'console', browserLog) | ||
} | ||
@@ -291,1 +291,10 @@ | ||
} | ||
function removeListener (page, event, listener) { | ||
if (page.removeListener != null) { | ||
page.removeListener(event, listener) | ||
return | ||
} | ||
page.off(event, listener) | ||
} |
{ | ||
"name": "chrome-page-eval", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Evaluate a script function on a page with Chrome", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
24008
437