From 1eac99e0ba6c6d680a2464516eeba90cc0f293e9 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Sat, 7 Oct 2023 11:35:17 -0500 Subject: [PATCH] feat: Request.isInterceptionResolutionHandled --- src/Puppeteer.Page.HTTP.Request.js | 6 ++++++ src/Puppeteer.Page.HTTP.Request.purs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Puppeteer.Page.HTTP.Request.js b/src/Puppeteer.Page.HTTP.Request.js index 1061b65..9125309 100644 --- a/src/Puppeteer.Page.HTTP.Request.js +++ b/src/Puppeteer.Page.HTTP.Request.js @@ -33,6 +33,12 @@ export const _headers = r => () => { ) } +/** + * @type {(_1: HTTPRequest) => () => boolean} + */ +export const isInterceptResolutionHandled = r => () => + r.isInterceptResolutionHandled() + /** * @type {(_1: HTTPRequest) => () => boolean} */ diff --git a/src/Puppeteer.Page.HTTP.Request.purs b/src/Puppeteer.Page.HTTP.Request.purs index 7b0abde..6cc753e 100644 --- a/src/Puppeteer.Page.HTTP.Request.purs +++ b/src/Puppeteer.Page.HTTP.Request.purs @@ -14,6 +14,7 @@ module Puppeteer.HTTP.Request , method , resourceType , url + , isInterceptResolutionHandled ) where import Prelude @@ -72,6 +73,7 @@ prepareContinueRequestOverrides { headers: headers', method: method', postData: , url: FFI.maybeToUndefined url' } +foreign import isInterceptResolutionHandled :: Request -> Effect Boolean foreign import isNavigation :: Request -> Effect Boolean foreign import method :: Request -> Effect String foreign import resourceType :: Request -> Effect String