cdp: complete Network events and include worker requests#3037
Conversation
Add required timestamp, type, request, response, and timing fields so strict CDP clients can deserialize emitted events.
| try jws.write("High"); | ||
| } | ||
|
|
||
| { |
There was a problem hiding this comment.
I don't think this is accurate. Unless you have a strong need for this right now, I'd rather leave it out until we can generate a correct value
There was a problem hiding this comment.
I agree that hardcoding strict-origin-when-cross-origin is inaccurate. However, chromiumoxide treats referrerPolicy as required and drops the entire Network.requestWillBeSent event when it is missing. Could we expose the policy Lightpanda actually applies instead of omitting the field?
There was a problem hiding this comment.
I set it to unsafe-url.
Keep worker requests visible on the page CDP session when their WorkerGlobalScope frame id is absent from the document frame tree. Add a regression fixture covering the worker script and a fetch from inside the worker.
878f6ac to
e3ec937
Compare
|
I just rebased, didn't touch anything else. |
Give accurate connectionId, connectionReused, initialPriority and securityState values. Always set `referrerPolicy` to `unsafe-url` as the most honest answer (we should implement proper referrer policy!). For workers, track the underlying frame_id so that it can be used for the `documentURL` field.
|
@Ppsoft1991 are you able to test the last version of this PR on your use case? |
I tested the latest version at 5acfd38: |
Summary
Problem
Strict CDP clients discard Lightpanda Network messages when protocol-required fields are absent. Worker requests had a separate issue: their WorkerGlobalScope frame IDs do not resolve through the document frame tree, so requestWillBeSent returned early while later response events were still emitted.
Testing