HTMLAreaElement: protocol プロパティ

HTMLAreaElement.protocol プロパティは、 URL のプロトコルスキームを表す文字列で、最後の ':' を含みます。

文字列です。

エリアのリンクのプロトコルを取得

js
// <area id="myArea" href="https://developer.mozilla.org/en-US/HTMLAreaElement"> 要素が文書にあったとします。
const area = document.getElementById("myArea");
area.protocol; // 'https:' を返す

仕様書

Specification
HTML Standard
# dom-hyperlink-protocol-dev

ブラウザーの互換性

BCD tables only load in the browser

関連情報