A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/ja/docs/Web/API/HTMLImageElement/attributionSrc below:

HTMLImageElement: attributionSrc プãƒãƒ‘ティ - Web API

HTMLImageElement: attributionSrc プロパティ

Limited availability

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

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

attributionSrc は HTMLImageElement インターフェイスのプロパティで、 <img> 要素の attributionsrc 属性をプログラムで取得および設定し、その属性の値を反映します。attributionsrc は、ブラウザーに画像リクエストとともに Attribution-Reporting-Eligible ヘッダーを送信するように指示します。

サーバー側では、Attribution-Reporting-Register-Source または Attribution-Reporting-Register-Trigger ヘッダーをレスポンスで送信し,それぞれ画像ベースの帰属ソースまたは帰属トリガーを登録します。どのレスポンスヘッダーを送り返すべきかは、登録をトリガーした Attribution-Reporting-Eligible ヘッダーの値によって異なります。

ブラウザーが画像ファイルを含む応答を受信すると、ソース/トリガーが登録されます。

メモ: ユーザーが必ずしもその画像を認識できるとは限らないことに留意してください。それは、帰属レポートのみに使用される 1x1 の透明トラッキングピクセルである可能性があります。

詳しくは帰属レポート API を参照してください。

値

文字列。このプロパティには、取得および設定できる 2 つのバージョンがあります。

例 空の attributionSrc を設定
<img src="advertising-image.png" />
const imgElem = document.querySelector("img");
imgElem.attributionSrc = "";
URL を含む attributionSrc の設定
<img src="advertising-image.png" />
// `=` などの特殊文字が含まれている場合、正しく解析されない
// 可能性があるため、URLをエンコードします。
const encodedUrlA = encodeURIComponent("https://a.example/register-source");
const encodedUrlB = encodeURIComponent("https://b.example/register-source");

const imgElem = document.querySelector("img");
imgElem.attributionSrc = `${encodedUrlA} ${encodedUrlB}`;
仕様書 ブラウザーの互換性 関連情報

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4