-
Notifications
You must be signed in to change notification settings - Fork 91
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
Update scroll to text fragment #2459
Conversation
I think this might actually exist as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait I'm undercaffeinated. I think that key solves some problems. Here's an actual review.
features/scroll-to-text-fragment.yml
Outdated
baseline: false | ||
baseline: low | ||
baseline_low_date: 2024-09-30 | ||
support: | ||
chrome: "81" | ||
chrome_android: "81" | ||
edge: "83" | ||
firefox: "131" | ||
firefox_android: "131" | ||
safari: "16.1" | ||
safari_ios: "16.1" | ||
# document.fragmentDirective cannot be considered part of this feature due to | ||
# https://webkit.org/b/273466. TODO: Consider partial support for this feature | ||
# depending on https://github.com/WICG/scroll-to-text-fragment/issues/257. | ||
# compat_features: | ||
# - api.Document.fragmentDirective | ||
# - api.FragmentDirective | ||
compat_features: | ||
- api.Document.fragmentDirective | ||
- api.FragmentDirective |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the right thing to do here now is:
- Add
html.elements.a.text_fragments
tocompat_features
- Use
compute_from: html.elements.a.text_fragments
to do the override (instead of the manual one here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh excellent! That makes things much better, thanks for tracking that down.
See #1007 and #732 for context.
Essentially, the feature itself is not in BCD, so the status in manually set. This adds Firefox support, which makes it baseline low (and matches Caniuse).
Separately, feature detection was not added in Safari, and has been sitting behind a feature flag. It will be enabled by default in Safari at some later date, per WebKit/WebKit#36413.
This adds the keys for feature detection. We'll need to do more cleanup once Safari supports feature detection.