-
Notifications
You must be signed in to change notification settings - Fork 42
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
document.fragmentDirective doesn't work for feature detection #257
Comments
It makes a lot of sense to make the feature detectable. Else, polyfills that emulate the native highlighting, for example, by injecting |
Can the situation be salvaged though? Is it a problem if the feature appears unsupported even though it's supported? |
In the worst case someone would then inject/load a polyfill despite native support. |
I've filed GoogleChromeLabs/text-fragments-polyfill#157 to probe about what will happen with that polyfill. |
Hmm, would the polyfill be an issue if a browser has support but claims not to? In that case it'd strip the The bigger issue is we added it so that sites could selectively add a text directive to an anchor only for agents that it knows will strip it off, given that there were cases where adding it could break a site when followed - though this is fairly rare and I'm not sure if anyone uses it for that. I'm curious to hear WebKit's take on https://webkit.org/b/273466 - if they did this intentionally and don't see any issues I suppose it might be a signal we could try unshipping it... |
Correct, this is what I found out and documented in GoogleChromeLabs/text-fragments-polyfill#157 (comment). |
https://bugs.webkit.org/show_bug.cgi?id=273466 has been fixed. I think this issue can be closed. |
Note that it's not enabled by default, though I don't see any reason not to do that. |
Opened WebKit/WebKit#36413 |
Due to https://webkit.org/b/273466, web developers will not be able to rely on
document.fragmentDirective
to detect support for text fragments.The possible paths to interop are WebKit adding
document.fragmentDirective
or Chromium removing it. Either way makes it impossible to usedocument.fragmentDirective
for feature detection. I don't have an opinion on which way to go.The text was updated successfully, but these errors were encountered: