HTMLAreaElement: ping プロパティ

Limited availability

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

pingHTMLAreaElement インターフェイスのプロパティで、 URL を空白で区切ったリストです。このリンクを辿ると、ブラウザーは PING を本体とした POST リクエストをその URL に送信します。

これは <area> 要素の ping 属性を反映します。

メモ: このプロパティは Firefox では有効ではなく、プライバシーおよびセキュリティ上の理由により使用が制限されている場合があります。

html
<map>
  <area
    href="https://example.com"
    ping="https://example-tracking.com https://example-analytics.com"
    alt="example" />
</map>
js
const areaCollection = document.getElementsByTagName("map")[0].areas;
console.log(areaCollection[0].ping); // 出力: "https://example-tracking.com https://example-analytics.com"

仕様書

Specification
HTML
# dom-area-ping

ブラウザーの互換性

関連情報