hypothesis / hypothesis/client

Consider replacing custom `scrolltorange` event with `beforematch`

Open
#3,342 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mustache
Stars
730
Forks
224
PR merge metrics
No merged PRs in 30d

Description

When the Hypothesis client scrolls to an annotation, a custom `scrolltorange` event is emitted. This event enables the host page to reveal content which might be hidden behind a collapsible section or switch a tab control to the tab containing the content. Chrome recently added a "scroll to text" feature with an associated [`beforematch` event](https://www.chromestatus.com/feature/5400510406328320) which serves a similar purpose. We might want to consider replacing our custom event by emitting `beforematch` in future on the basis that it will be more widely supported by websites.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.