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 docs for {NavigateEvent,PopStateEvent}.hasUAVisualTransition #36705

Conversation

@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Nov 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

Preview URLs

External URLs (8)

URL: /en-US/docs/Web/API/PopStateEvent/hasUAVisualTransition
Title: PopStateEvent: hasUAVisualTransition property


URL: /en-US/docs/Web/API/NavigateEvent/hasUAVisualTransition
Title: NavigateEvent: hasUAVisualTransition property

(comment last updated: 2025-01-06 15:12:07)

@skyclouds2001 skyclouds2001 marked this pull request as ready for review November 9, 2024 18:03
@skyclouds2001 skyclouds2001 requested a review from a team as a code owner November 9, 2024 18:03
@skyclouds2001 skyclouds2001 requested review from sideshowbarker and removed request for a team November 9, 2024 18:03
@sideshowbarker sideshowbarker removed their request for review November 14, 2024 09:02
@skyclouds2001 skyclouds2001 force-pushed the NavigateEvent-PopStateEvent-hasUAVisualTransition branch from 7ca90f7 to b65b486 Compare November 23, 2024 04:52
@skyclouds2001 skyclouds2001 force-pushed the NavigateEvent-PopStateEvent-hasUAVisualTransition branch from b65b486 to 98f3c4b Compare December 14, 2024 07:00
@skyclouds2001 skyclouds2001 force-pushed the NavigateEvent-PopStateEvent-hasUAVisualTransition branch from 98f3c4b to b918c05 Compare December 20, 2024 01:52
@bsmth bsmth self-requested a review December 31, 2024 09:31
```js
window.addEventListener("popstate", (event) => {
// Fetch the new content
const newContent = await fetchNewContent(event.destination.url, {
Copy link
Member

Choose a reason for hiding this comment

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

Is the origin important here given the event type? The same-origin clarification was good above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

argee...

Copy link
Member

Choose a reason for hiding this comment

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

I mean is this relevant for popstate:

if (!event.canIntercept) {
    return;
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I've fixed the examplecode, as the event type is PopStateEvent, which only supports state and hasUAVisualTransition properties

@skyclouds2001 skyclouds2001 requested a review from bsmth January 6, 2025 15:11
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Super, ty. Once clarification open about popstate but otherwise looking good!

@bsmth
Copy link
Member

bsmth commented Jan 7, 2025

Thank you, merging now 👍🏻

@bsmth bsmth merged commit 875b840 into mdn:main Jan 7, 2025
8 checks passed
@skyclouds2001 skyclouds2001 deleted the NavigateEvent-PopStateEvent-hasUAVisualTransition branch January 7, 2025 14:33
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.

2 participants