Back to Puppeteer

Page.emulateFocusedPage() method

docs/api/puppeteer.page.emulatefocusedpage.md

19.2.2440 B
Original Source

Page.emulateFocusedPage() method

Emulates focus state of the page.

Signature

typescript
class Page {
  abstract emulateFocusedPage(enabled: boolean): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

enabled

</td><td>

boolean

</td><td>

Whether to emulate focus.

</td></tr> </tbody></table>

Returns:

Promise<void>