aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/htmlhyperlinkelementutils/host
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/api/htmlhyperlinkelementutils/host
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/web/api/htmlhyperlinkelementutils/host')
-rw-r--r--files/ru/web/api/htmlhyperlinkelementutils/host/index.html116
1 files changed, 116 insertions, 0 deletions
diff --git a/files/ru/web/api/htmlhyperlinkelementutils/host/index.html b/files/ru/web/api/htmlhyperlinkelementutils/host/index.html
new file mode 100644
index 0000000000..742386e83b
--- /dev/null
+++ b/files/ru/web/api/htmlhyperlinkelementutils/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
+---
+<div>{{ApiRef("URL API")}}</div>
+
+<p>Свойство <strong><code>HTMLHyperlinkElementUtils.host</code></strong> <span class="st">–</span> это {{domxref("USVString")}}, содержащий хост, а именно <em>имя хоста</em> и, если <em>порт</em> не пустой, <code>':'</code> и <em>порт</em>.</p>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="syntaxbox"><em>string</em> = <em>object</em>.host;
+<em>object.<code>host</code></em> = <em>string</em>;
+</pre>
+
+<h2 id="Примеры">Примеры</h2>
+
+<pre class="brush: js">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"
+</pre>
+
+<h2 id="Спецификации">Спецификации</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Спецификация</th>
+ <th scope="col">Статус</th>
+ <th scope="col">Комментарий</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Изначальное определение.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Совместимость_с_браузерами">Совместимость с браузерами</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Возможность</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Базовая поддержка<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop("22")}} [3]</td>
+ <td>{{CompatNo}}<sup>[2]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Возможность</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Базовая поддержка<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile("22")}} [3]</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.</p>
+
+<p>[2] В Internet Explorer 9 свойство host элемента {{HTMLElement("a")}} всегда включает порт (т.е. <code>developer.mozilla.org:443</code>), даже если порт в <code>href</code> не указан явно.</p>
+
+<p>[3] С Gecko 22 по Gecko 44, это свойство находилось в <code>URLUtils</code>. Оно было перемещено или в <code>HTMLHyperlinkElementUtils</code>, или напрямую в интерфейс.</p>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li>Миксин {{domxref("HTMLHyperlinkElementUtils")}}, к которому принадлежит это свойство.</li>
+</ul>