chore: disable page.pause() when JS debugger is attached (#11926)
This commit is contained in:
parent
7912c515a3
commit
dbd124d84b
|
|
@ -644,7 +644,10 @@ export class Page extends ChannelOwner<channels.PageChannel> implements api.Page
|
||||||
}
|
}
|
||||||
|
|
||||||
async pause() {
|
async pause() {
|
||||||
await this.context()._channel.pause();
|
if (!!require('inspector').url())
|
||||||
|
debugger; // eslint-disable-line no-debugger
|
||||||
|
else
|
||||||
|
await this.context()._channel.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
async pdf(options: PDFOptions = {}): Promise<Buffer> {
|
async pdf(options: PDFOptions = {}): Promise<Buffer> {
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
|
||||||
}
|
}
|
||||||
|
|
||||||
async pause(params: channels.BrowserContextPauseParams, metadata: CallMetadata) {
|
async pause(params: channels.BrowserContextPauseParams, metadata: CallMetadata) {
|
||||||
// Inspector controller will take care of this.
|
// Debugger will take care of this.
|
||||||
}
|
}
|
||||||
|
|
||||||
async newCDPSession(params: channels.BrowserContextNewCDPSessionParams): Promise<channels.BrowserContextNewCDPSessionResult> {
|
async newCDPSession(params: channels.BrowserContextNewCDPSessionParams): Promise<channels.BrowserContextNewCDPSessionResult> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue