Skip to content
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

feat: do not emit initial navigation events #2796

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sadym-chromium
Copy link
Collaborator

Addressing #2793

@sadym-chromium sadym-chromium added DO NOT MERGE Don't merge the marked PR update-expectations Update WPT expectations labels Nov 21, 2024
@@ -55,6 +55,8 @@ export class BrowsingContextImpl {
* If null, this is a top-level context.
*/
#parentId: BrowsingContext.BrowsingContext | null = null;
/** Flags if the initial navigation to `about:blank` is in progress. */
#initialNavigation = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the root cause is that Target.createTarget actually starts a second navigation after creating a new browsing context?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the new target is created by window.open, the initial navigation is emitted as well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see navigate calls in the window.open steps https://html.spec.whatwg.org/#window-open-steps

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be depending on the windowType result.

Copy link
Collaborator

@OrKoN OrKoN Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw it looks like old headless implementation does not do a navigation (on Target.createTarget)

@sadym-chromium sadym-chromium added the puppeteer Run Puppeteer test when added to PR label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Don't merge the marked PR puppeteer Run Puppeteer test when added to PR update-expectations Update WPT expectations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants