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

Add an example of measuring prerendering activations #36526

Merged
merged 10 commits into from
Nov 1, 2024
Merged

Conversation

domenic
Copy link
Contributor

@domenic domenic commented Oct 28, 2024

Description

Add an explicit example of how to measure prerendering activations.

Motivation

We found some web developers attempting to use the pattern for delaying code during prerendering for measuring prerendering activations, which does not work well.

Additional details

None

Related issues and pull requests

None

We found some web developers attempting to use the pattern for delaying code during prerendering for tracking prerendering activations, which does not work well. Add an explicit example of how to do the latter.
@domenic domenic requested a review from a team as a code owner October 28, 2024 05:39
@domenic domenic requested review from Elchi3 and removed request for a team October 28, 2024 05:39
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Oct 28, 2024
Copy link
Contributor

github-actions bot commented Oct 28, 2024

Preview URLs

(comment last updated: 2024-11-01 11:47:10)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link

@nyaxt nyaxt left a comment

Choose a reason for hiding this comment

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

non-owner LGTM

domenic and others added 2 commits October 29, 2024 11:24
Co-authored-by: Barry Pollard <[email protected]>
@domenic domenic changed the title Add an example of tracking prerendering activations Add an example of measuring prerendering activations Oct 29, 2024
Copy link
Contributor

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@bsmth bsmth self-requested a review October 30, 2024 14:58
@hamishwillee
Copy link
Collaborator

@domenic Aside from the comments this looks good to me. Do we also need an update to https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering for this case (it has the same example).

domenic and others added 2 commits November 1, 2024 13:51
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Nov 1, 2024
@domenic
Copy link
Contributor Author

domenic commented Nov 1, 2024

Do we also need an update to https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering for this case (it has the same example).

Good call. At first I thought we might be fine since that page has a variety of examples that guide you in the right direction, but I think being more explicit and including the new example as well is better. I've attempted to do so; thank you!

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

@domenic Thank you. I have approved. Is there anyone else you'd like a review from before merge?

@domenic
Copy link
Contributor Author

domenic commented Nov 1, 2024

No, we should be good! Thank you!!

@bsmth
Copy link
Member

bsmth commented Nov 1, 2024

Thanks, all, merging shortly

@bsmth bsmth merged commit 420ee5d into mdn:main Nov 1, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants