-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify the initiator steps #714
base: main
Are you sure you want to change the base?
Conversation
7c0f66a
to
ff7b66d
Compare
a7af82c
to
1e54584
Compare
2dd66fc
to
0c8f40b
Compare
0c8f40b
to
d0e48b7
Compare
d0e48b7
to
77dddd1
Compare
77dddd1
to
a524f96
Compare
@juliandescottes @jgraham @whimboo I attempted to improve the initiator steps. There are still a few problems although it brings the steps closer to what is expressed by CDDL types. Problems:
WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, overall that looks good to me. Not sure yet how to retrieve the fetch initiator type on our side, but that shouldn't block landing this.
Co-authored-by: Julian Descottes <[email protected]>
Co-authored-by: Julian Descottes <[email protected]>
Co-authored-by: Julian Descottes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like if all the logic we need to map onto what Puppeteer expects is the fetch initiator type and isTopLevel
we should consider just providing those directly and performing the mapping in the client.
1. Otherwise, if |request|'s [=request/initiator type=] is "<code>script</code>" | ||
and |request| is not [=isTopLevel=], set |type| to "<code>script</code>". | ||
|
||
1. Otherwise, if |request|'s [=request/initiator type=] is "<code>css</code>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to me if this is correct given e.g. @import
rules (I don't know how CDP behaves)
@juliandescottes I think the BiDi initiator is already different from the fetch spec: "parser" / "script" / "preflight" / "other these are the types currently specified. The issue with the fetch spec is that it is not clear how all those initiator types are computed (the fetch spec has a list but the computations seem to be scattered around a bunch of other specs?) and AFAIK our implementation does not implement all of them. In any case, I think we can postpone this then. In CDP, we do not have isTopLevel and fetch initiator types exposed so it would take some time to plumb them through and since there is no use case for exposing them directly, we can consider it later. |
Issue #698
This PR clarifies the logic of how to compute various initiator types and makes the following changes:
Preview | Diff