Window: credentialless プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

window.credentialless は読み取り専用プロパティで、現在の文書が信頼性のない <iframe> 内に読み込まれたかどうか、つまり新しい、一時的なコンテキストで読み込まれたかを示す論理値を返します。

このコンテキストは、そのオリジンに関連するネットワーク、クッキー、ストレージデータにアクセスすることはありません。それは最上位の文書の寿命に依存する新しいコンテキストを使用します。返ると、Cross-Origin-Embedder-Policy (COEP) 埋め込みルールが解除され、COEP を設定した文書はそうでないサードパーティ文書を埋め込むことができます。

より詳しい説明は、無信頼の iframe を参照してください。

論理値です。true の値は文書が無信頼の <iframe> 内に読み込まれたことを示し、false は読み込まれなかったことを示します。

次のようにして、無信頼の <iframe> を指定することができます。

html
<iframe
  src="https://en.wikipedia.org/wiki/Spectre_(security_vulnerability)"
  title="Spectre vulnerability Wikipedia page"
  width="960"
  height="600"
  credentialless></iframe>

対応しているブラウザー内の <iframe> に読み込まれた文書が以下の行を実行した場合、true を返します。

js
console.log(window.credentialless);

仕様書

Specification
Iframe credentialless
# dom-window-credentialless

ブラウザーの互換性

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
credentialless
Experimental

Legend

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

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.