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

Conform with standard History API #109

Merged
merged 3 commits into from
Aug 18, 2021
Merged

Conform with standard History API #109

merged 3 commits into from
Aug 18, 2021

Conversation

PaperStrike
Copy link
Owner

@PaperStrike PaperStrike commented Aug 18, 2021

Motivation and Context

  • The initial value of window.history.state is null.
  • replaceState and pushState make no use of "title" parameter in HTML Standard.
  • Safari uses the title parameter to present the name of the history state in places like back button dropdown, and if we pass empty strings, Safari uses unlovely raw URLs. — Set the title of current history state at the end of preparePage.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no bug fix and new feature but improvements)

Checklist:

  • My change requires new tests.
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@PaperStrike PaperStrike added enhancement New feature or request minor Pull requests that require a minor version update labels Aug 18, 2021
@PaperStrike PaperStrike changed the title Adapt standard History API, conforming with Safari Adapt standard History API Aug 18, 2021
@PaperStrike PaperStrike changed the title Adapt standard History API Conform with standard History API Aug 18, 2021
@PaperStrike PaperStrike merged commit 9a894b4 into main Aug 18, 2021
@PaperStrike PaperStrike deleted the history-title branch August 18, 2021 17:30
PaperStrike added a commit that referenced this pull request Aug 19, 2021
- Set history state title for Safari in LazyHistory.pull instead of in preparePage, fixing #109 not setting the state title at initial page load, simplifing the state update flow
@PaperStrike PaperStrike removed the minor Pull requests that require a minor version update label Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant