Add "initiator" to "network.beforeRequestSent" event
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [webdriver:m11])
BiDi network events should contain Initiator data defined in the current PR as
network.Initiator = {
type: "parser" / "script" / "preflight" / "other",
?columnNumber: uint,
?lineNumber: uint,
?stackTrace: StackTrace,
?request: network.Request
};
At the time of filing the logic to compute the type is not clear:
TODO: Get the type. It’s not quite clear how this ought to work; the CDP data depends on whether the navigation was kicked off by the parser or by script (so e.g. inserting an image from script causes the initiator to be "script"), but that doesn’t correspond to anything in Fetch.
Also stackTrace information is not accessible from the parent process, so it will be more complicated to add this information, since for ow our implementation for beforeRequestSent lives only in the parent process.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 2•10 months ago
|
||
After talking to Julian we are going to de-prioritize this bug for now. We will re-evaluate once it becomes a blocker for some WebDriver BiDi API.
Comment 3•3 months ago
|
||
It's used in some P2 Puppeteer tests and users wanted to have it for CDP so most likely BiDi as well. We should check how hard it is to implement.
Reporter | ||
Comment 4•3 months ago
|
||
We will split out the stacktrace part out if this bug, but this still requires clarification to know which initiator type should be set for which use cases.
Reporter | ||
Updated•3 months ago
|
Reporter | ||
Updated•3 months ago
|
Reporter | ||
Comment 5•3 months ago
|
||
For reference, the current logic to handle this in DevTools can be found around https://searchfox.org/mozilla-central/rev/3c72de9280ec57dc55c24886c6334d9e340500e8/devtools/shared/network-observer/NetworkUtils.sys.mjs#24-69
Of course we might need to change it to make it spec compliant.
Comment 6•3 months ago
|
||
Julian, as it looks like this is only needed for the network.beforeRequestSent
event or do I miss something?
Reporter | ||
Comment 7•3 months ago
|
||
That's correct, updated the bug accordingly
Updated•3 months ago
|
Updated•2 months ago
|
Reporter | ||
Updated•1 month ago
|
Description
•