Closed Lightning00Blade closed 7 months ago
The first option sounds good. Since the intercept is only really necessary to block the request I think the current behavior is fine, and calling it out explicitly in the spec could be enough.
I think it's worth mentioning as non-normative note (first option) because the spec already defined this behavior. About CDP implementation: we will need to keep the interception on, until the last request is handled, and auto-continue new requests.
Currently there is an implicit behavior when removing the
last intercept
from the session'sintercept map
. Let's say we do the following steps:BeforeRequestSent
).fetch
request from the page to URL A.BeforeRequestSent
get emitted and event get aisBlocked: true
andintecepts: [ "<ID>" ]
network.continueRequest
commandThe question here is if this would be the expected from the user?
I think we should either:
network.removeIntercept
command.network.removeIntercept
command when there are request in-flight that are being blocked only by this.network.continueRequest
command were called.Note: This was discovered as CDP's behavior is to continue the request if interception is removed.