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: enable tab targets #11099

Merged
merged 3 commits into from Oct 9, 2023
Merged

feat: enable tab targets #11099

merged 3 commits into from Oct 9, 2023

Conversation

OrKoN
Copy link
Collaborator

@OrKoN OrKoN commented Oct 9, 2023

Tab target is a new type of target in CDP that reflects the architectural changes in Chromium that were needed for features such as bfcache, portals and prerendering.

Previously, the page targets were the top-level targets representing the entire tab. If you navigate to a new URL, the page target would remain the same. With the introduction of the tab target, it's not possible to have multiple page targets active within one tab. For example, one page would be the currently shown page and the other one would be a prerendered page. When the user navigates to the prerendered page, the secondary page becomes the primary and the primary page target gets destroyed (the process is called activation).

This change enables tab targets and allows testing Chrome features related to prerendering. Emulation and network manager domains should work with the prerendered targets. Some features like JS/CSS coverage might not work during the activation so you would need to disable prerendering to test those.

Use command line flags to disable prerendering in Chrome if you encounter issues. For example,

--disable-features=Prerender2

@OrKoN OrKoN force-pushed the orkon/tab-target branch 2 times, most recently from 88e118b to 7edc3d4 Compare October 9, 2023 07:23
@OrKoN OrKoN marked this pull request as ready for review October 9, 2023 08:58
@OrKoN OrKoN enabled auto-merge (squash) October 9, 2023 10:25
[Tab target is a new type of target in CDP](https://docs.google.com/document/d/14aeiC_zga2SS0OXJd6eIFj8N0o5LGwUpuqa4L8NKoR4/edit) that reflects the architectural changes in Chromium that were needed for features such as bfcache, portal and prerendering.

Previously, the `page` targets were the top-level targets representing the entire tab. If you navigate to a new URL, the page target would remain the same. With the introduction of the `tab` target, it's not possible to have multiple page targets active within one tab. For example, one page would be the currently shown page and the other one would be a [prerendered](https://github.com/WICG/nav-speculation/) page. When the user navigates to the prerendered page, the secondary page becomes the primary and the primary page target gets destroyed (the process is called activation).

This change enables tab targets and allows testing Chrome features related to prerendering.
Emulation and network manager domains should work with the prerendered targets. Some features
like JS/CSS coverage might not work over activation so you would need to disable activation to test those.

Use command line flags to disable prerendering in Chrome if you encounter issues. For example,
```
--disable-features=Prerender2
```
@OrKoN OrKoN disabled auto-merge October 9, 2023 11:49
@OrKoN OrKoN merged commit 8324c16 into main Oct 9, 2023
52 of 54 checks passed
@OrKoN OrKoN deleted the orkon/tab-target branch October 9, 2023 11:49
@release-please release-please bot mentioned this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants