Document: fragmentDirective プロパティ

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

fragmentDirectiveDocument インターフェイスの読み取り専用プロパティで、現在の文書の FragmentDirective を返します。

FragmentDirective オブジェクトです。

対応するブラウザーの開発ツールを使用して、1 つ以上の一致するテキストフラグメントがあるタブで、以下を実行してみてください。

js
document.fragmentDirective;
// 対応していれば FragmentDirective オブジェクトが返される
// そうでなければ undefined となる

この機能は、現在は主に機能検出を目的としていますが、将来的には、翻訳ヒントなど他の情報を記載するために展開することができます。

仕様書

Specification
URL Fragment Text Directives
# dom-document-fragmentdirective

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
fragmentDirective

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

関連情報