Open Bug 1543072 Opened 5 months ago Updated 4 months ago

Support Puppeteer's Page.close's runBeforeUnload argument

Categories

(Remote Protocol :: Page, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

Details

Bug 1543071 introduce minimal support for puppeteer's Page.close method,
but did not implemented the optional runBeforeUnload argument.
This option depends on implementing CDP's Page.close method:
https://github.com/GoogleChrome/puppeteer/blob/9ef23b17542cc630e502fcf6689bf6b20fa9911b/lib/Page.js#L985-L990

  async close(options = {runBeforeUnload: undefined}) {
    assert(!!this._client._connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
    const runBeforeUnload = !!options.runBeforeUnload;
    if (runBeforeUnload) {
      await this._client.send('Page.close');
    } else {
Priority: -- → P3
Type: defect → enhancement
Summary: Support puppeteer's Page.close's runBeforeUnload argument → Support Puppeteer's Page.close's runBeforeUnload argument
You need to log in before you can comment on or make changes to this bug.