Skip to content

Commit

Permalink
Added wikipedia example to beforematch explainer
Browse files Browse the repository at this point in the history
  • Loading branch information
josepharhar committed May 2, 2020
1 parent a5706e5 commit c785e03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions explainer-beforematch.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ relevant sections. For instance, navigating to
observing the `beforematch` event for that section as a result of the
scroll-to-text fragment navigation match.

One possible real-world application of this is the collapsed sections on mobile
wikipedia pages. find-in-page and scroll-to-text currently can't find text inside
of the collapsed sections, but with beforematch and content-visibility they
could be searchable and automatically expanded.

Also note that developer adoption of the `beforematch` event in these use-cases should be
straight-forward, since the typical page that provides content in collapsed
sections already has an event handler to expand and show the section. With the
Expand Down

0 comments on commit c785e03

Please sign in to comment.