Closed Bug 1587426 Opened 5 years ago Closed 1 year ago

[meta] Fetch.continueRequest

Categories

(Remote Protocol :: CDP, task)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

()

Details

(Keywords: meta, Whiteboard: [method=Fetch.continueRequest] )

No description provided.

Kris: this bug is part of implementing the CDP Fetch domain in Firefox. The featureset is that you are able to provide a filter on url (or a couple of other things) and for requests matching the filter, block the request and allow client code to modify parts of the request and reponse. AFAICT the featureset is mostly compatible with the WebExtension StreamFilter API, but it isn't fully obvious to me how easy that is to reuse outside the WebExtension context; afaict from reading the code it's a DOM API that's only enabled if some extensions permissions are set?

Does it seem plausible that the existing code covers most of the requirements here, and if so how much work is required for us to use it? Can we just grant ourselves the relevant permissions or is there something different we should be doing?

Flags: needinfo?(kmaglione+bmo)
Component: Page → Fetch
Whiteboard: [method=Fetch.continueRequest] → [puppeteer-alpha]
Whiteboard: [puppeteer-alpha] → [puppeteer-alpha] [method=Fetch.continueRequest]

The implementation of this method is blocked on bug 1591389 for now which will add basic support for the Fetch domain.

While this method is not directly used by Gutenberg e2e tests, the frequency of calls is kinda high:

1091 Fetch.continueRequest

We should keep it on the list for alpha but re-evaluate it later.

Depends on: 1591389
Whiteboard: [puppeteer-alpha] [method=Fetch.continueRequest] → [method=Fetch.continueRequest]

(In reply to James Graham [:jgraham] from comment #1)

Kris: this bug is part of implementing the CDP Fetch domain in Firefox. The featureset is that you are able to provide a filter on url (or a couple of other things) and for requests matching the filter, block the request and allow client code to modify parts of the request and reponse. AFAICT the featureset is mostly compatible with the WebExtension StreamFilter API, but it isn't fully obvious to me how easy that is to reuse outside the WebExtension context; afaict from reading the code it's a DOM API that's only enabled if some extensions permissions are set?

Does it seem plausible that the existing code covers most of the requirements here, and if so how much work is required for us to use it? Can we just grant ourselves the relevant permissions or is there something different we should be doing?

Yes, at least in principal you should be able to use it. In theory, all you should have to do is create a WebExtensionPolicy object, then create a ChannelWrapper for the channel, and register the extension as being able to filter it:

https://searchfox.org/mozilla-central/rev/40b561b9accbff54387edcba2b8b4a3c3828110e/dom/chrome-webidl/ChannelWrapper.webidl#194-198

Then you can use StreamFilter.create with the ID of your policy object and of the channel. I can't tell you off hand how smoothly it will go, though.

Flags: needinfo?(kmaglione+bmo)
Component: CDP: Fetch → CDP
Severity: normal → S3
Severity: normal → S3

Right now we are working on the network interception feature for WebDriver BiDi and is targeted for this year. As such we wont add that feature to CDP.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.