Commit b8d038a0 authored by Fred Chasen's avatar Fred Chasen

browser close method

parent 59012324
{
"name": "pagedjs-cli",
"version": "0.0.6",
"version": "0.0.7",
"author": "Fred Chasen",
"license": "MIT",
"homepage": "https://pagedmedia.org",
......
......@@ -43,6 +43,8 @@ class Printer extends EventEmitter {
ignoreHTTPSErrors: true
});
this.browser = browser;
return browser;
}
......@@ -53,7 +55,7 @@ class Printer extends EventEmitter {
});
if (!this.browser) {
this.browser = await this.setup();
await this.setup();
}
const page = await this.browser.newPage();
......@@ -249,6 +251,10 @@ class Printer extends EventEmitter {
return page;
}
async close() {
return this.browser.close();
}
}
module.exports = Printer;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment