Spec: https://wicg.github.io/scroll-to-text-fragment/#feature-detectability The purpose of document.fragmentDirective is to be able to feature detect support for text fragments, but according to https://caniuse.com/url-scroll-to-text-fragment Safari 16.1 shipped support for text fragments, but in my testing of Safari 17.4 and searching WebKit source, the feature detection bit isn't implemented.
I've also filed https://github.com/WICG/scroll-to-text-fragment/issues/257 for discussion.
<rdar://problem/127650843>
Pull request: https://github.com/WebKit/WebKit/pull/28784
The https://github.com/WebKit/WebKit/pull/28784 PR doesn’t actually build yet — I’m getting a linking error with the bindings-generated code that I still need to sort out: Undefined symbols for architecture arm64: "WebCore::JSFragmentDirective::getConstructor(JSC::VM&, JSC::JSGlobalObject const*)", referenced from: WebCore::jsDOMWindow_FragmentDirectiveConstructorGetter(JSC::JSGlobalObject&, WebCore::JSDOMWindow&) in UnifiedSource6.o "WebCore::toJS(JSC::JSGlobalObject*, WebCore::JSDOMGlobalObject*, WebCore::FragmentDirective&)", referenced from: JSC::JSValue WebCore::JSConverter<WebCore::IDLInterface<WebCore::FragmentDirective>>::convert<WebCore::FragmentDirective>(JSC::JSGlobalObject&, WebCore::JSDOMGlobalObject&, WebCore::FragmentDirective const&) in UnifiedSource6.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Committed 279258@main (04bd634bf209): <https://commits.webkit.org/279258@main> Reviewed commits have been landed. Closing PR #28784 and removing active labels.