Skip to content

Conflicting documentation about pushState and the popState event #30168

@Mossop

Description

@Mossop

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/History/pushState

What specific section or headline is this issue about?

History: pushState() method

What information was incorrect, unhelpful, or incomplete?

The page says:

This method is asynchronous. Add a listener for the popstate event in order to determine when the navigation has completed. The state parameter will be available in it

But over on the docs for popstate it says:

Note that just calling history.pushState() or history.replaceState() won't trigger a popstate event.

What did you expect to see?

The two pages should agree on whether calling pushState triggers a popstate event or not (I don't think it does).

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions