HTMLHyperlinkElementUtils.host
HTMLHyperlinkElementUtils.host
プロパティは、ホストを含む USVString
です。 ホストは、ホスト名の後に、URL のポートが空でない場合、':'
、および URL のポートが続きます。
構文
string = object.host;
object.host
= string;
例
var anchor = document.createElement("a");
anchor.href = "https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.host"
anchor.host == "developer.mozilla.org"
anchor.href = "https://developer.mozilla.org:443/en-US/HTMLHyperlinkElementUtils.host"
anchor.host == "developer.mozilla.org"
// 443 がスキームのデフォルトポートであるため、ポート番号は含まれません
anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLHyperlinkElementUtils.host"
anchor.host == "developer.mozilla.org:4097"
仕様
仕様 | 状態 | コメント |
---|---|---|
HTML Living Standard HTMLHyperlinkElementUtils.host の定義 |
現行の標準 | 初期定義 |
ブラウザーの互換性
No compatibility data found for api.HTMLHyperlinkElementUtils.host
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
関連情報
HTMLHyperlinkElementUtils
ミックスインに属します。