Puppeteer 中文文档v25.8.0

HTTPRequest.enqueueInterceptAction() 方法

将异步请求处理器添加到处理队列中。延迟的处理器不保证按任何特定顺序执行,但保证在请求拦截完成之前解析。

签名

class HTTPRequest {
  enqueueInterceptAction(
    pendingHandler: () => void | PromiseLike<unknown>,
  ): void;
}

参数

参数

类型

说明

pendingHandler

() => void | PromiseLike<unknown>

返回值:

void