The FragmentDirective
interface is an object exposed for feature detectability, that is, whether or not a browser supports text fragments.
It is accessed via the Document.fragmentDirective
property.
Instance properties
Instance methods
Examples
Try running the following in a supporting browser's devtools, in a tab with one or more matched text fragments:
document.fragmentDirective;
This functionality is mainly intended for feature detection at present. In the future, the FragmentDirective
object could include additional information.
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
FragmentDirective |
81 |
83 |
No |
No |
68 |
No |
81 |
81 |
No |
58 |
No |
13.0 |
See also