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

chore: support Tab targets #10148

Merged
merged 9 commits into from Aug 28, 2023
Merged

chore: support Tab targets #10148

merged 9 commits into from Aug 28, 2023

Conversation

OrKoN
Copy link
Collaborator

@OrKoN OrKoN commented May 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, 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 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).

Puppeteer does not support this interaction so this PR disabled the prerendering feature in addition to the previously disabled bfcache.

This change adds support for the tab target behind the flag. Currently, we don't plan on exposing the tab target via the Puppeteer API and aim at keeping it an implementation detail. The support for the tab target is also limited for now: we support the target activation but the tracing/network/a11y/coverage might not work as expected if the activation happens. We will aim at improving it in the future. For the scenarios, where no activation happens there should be no difference between the tab target and non-tab target modes.

The current level of support is relatively basic: emulation/tracing/coverage might not work as expected if an activation happens. We will enable the tab mode by default once the emulation/tracing/coverage is handled in a solid way.

Issue #10147

@OrKoN OrKoN force-pushed the orkon/tab branch 13 times, most recently from 14e54ba to 0a4e19e Compare August 11, 2023 07:29
@OrKoN OrKoN added the devtools label Aug 11, 2023
@OrKoN OrKoN removed the devtools label Aug 16, 2023
@OrKoN OrKoN force-pushed the orkon/tab branch 3 times, most recently from a005c92 to d5e5796 Compare August 17, 2023 08:01
@OrKoN OrKoN changed the title chore: tab wip feat: support Tab targets Aug 17, 2023
@OrKoN OrKoN force-pushed the orkon/tab branch 8 times, most recently from a897e67 to ba3c0f4 Compare August 17, 2023 14:36
@OrKoN OrKoN marked this pull request as ready for review August 17, 2023 15:58
@OrKoN OrKoN force-pushed the orkon/tab branch 2 times, most recently from 96734c6 to 95599b1 Compare August 21, 2023 07:45
@OrKoN OrKoN force-pushed the orkon/tab branch 3 times, most recently from 2ec6fcd to c641798 Compare August 24, 2023 08:47
@OrKoN OrKoN changed the title feat: support Tab targets chore: support Tab targets Aug 24, 2023
@OrKoN OrKoN force-pushed the orkon/tab branch 2 times, most recently from 3e1bab4 to b1eae87 Compare August 25, 2023 09:53
@OrKoN OrKoN merged commit c4bad4a into main Aug 28, 2023
32 checks passed
@OrKoN OrKoN deleted the orkon/tab branch August 28, 2023 06:20
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