From 05b2650717b84d199f6ebd5df8a8f9d1e3b23f3f Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Tue, 23 Feb 2021 15:56:25 +0100 Subject: sync: move --- files/ru/web/api/htmlanchorelement/host/index.html | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 files/ru/web/api/htmlanchorelement/host/index.html (limited to 'files/ru/web/api/htmlanchorelement/host') diff --git a/files/ru/web/api/htmlanchorelement/host/index.html b/files/ru/web/api/htmlanchorelement/host/index.html new file mode 100644 index 0000000000..742386e83b --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/host/index.html @@ -0,0 +1,116 @@ +--- +title: HTMLHyperlinkElementUtils.host +slug: Web/API/HTMLHyperlinkElementUtils/host +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/host +--- +
{{ApiRef("URL API")}}
+ +

Свойство HTMLHyperlinkElementUtils.host это {{domxref("USVString")}}, содержащий хост, а именно имя хоста и, если порт не пустой, ':' и порт.

+ +

Синтаксис

+ +
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"
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка[1]{{CompatNo}}{{CompatGeckoDesktop("22")}} [3]{{CompatNo}}[2]{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка[1]{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("22")}} [3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] В Internet Explorer 9 свойство host элемента {{HTMLElement("a")}} всегда включает порт (т.е. developer.mozilla.org:443), даже если порт в href не указан явно.

+ +

[3] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + -- cgit v1.2.3-54-g00ecf