Closed bokand closed 1 year ago
@jakearchibald @annevk, how does this look?
@jakearchibald - latest commits should have addressed all your comments, WDYT?
@annevk - in the interest of rationing your attention I'll merge this based on Jake's review (and the fact it'll be reviewed again on merge to HTML). But feel free to lmk if you'd prefer I wait on your review in future PRs (also happy to fix any issues post-merge)
Thanks, that's fine. General approach seems good to me.
This PR makes it so that the fragment directive is stripped from the URL whenever it is set to a history entry. Instead, the history entry keeps it in a separate
directive state
.The
directive state
is shared between contiguous history entries where the only difference is the non-directive portion of the fragment.Moving between session history entries will cause the
directive state
, if it differs from the current entry, to be set into anuninvoked directives
member on the Document. The "scroll to the fragment" steps will read directives from this member and attempt to perform the text search.When the fragment search ends,
uninvoked directives
is always cleared.The changes here are primarily in the "3.3 The Fragment Directive" and "3.4 Text Directives" sections. Most changes in other sections are minor and/or text that was moved out into these two section (and heavily rewritten).
Fixes #217
Preview | Diff