diff options
Diffstat (limited to 'files/ru/web/api/htmllinkelement/index.html')
-rw-r--r-- | files/ru/web/api/htmllinkelement/index.html | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/files/ru/web/api/htmllinkelement/index.html b/files/ru/web/api/htmllinkelement/index.html new file mode 100644 index 0000000000..6b75f0682a --- /dev/null +++ b/files/ru/web/api/htmllinkelement/index.html @@ -0,0 +1,118 @@ +--- +title: HTMLLinkElement +slug: Web/API/HTMLLinkElement +translation_of: Web/API/HTMLLinkElement +--- +<div> +<div>{{ APIRef("HTML DOM") }}</div> +</div> + +<p>Интерфейс <strong><code>HTMLLinkElement</code></strong> представляет справочную информацию для внешних ресурсов и отношение этих ресурсов к документу и наоборот (соответствует элементу <code><a href="/ru/docs/Web/HTML/Element/link"><link></a></code>; не путать с <code><a href="/ru/docs/Web/HTML/Element/a"><a></a></code>, который представлен элементом <code><a href="/ru/docs/Web/API/HTMLAnchorElement">HTMLAnchorElement</a></code>). Этот объект наследует все свойства и методы интерфейса {{domxref("HTMLElement")}}.</p> + +<p>{{InheritanceDiagram(600, 120)}}</p> + +<h2 id="Свойства">Свойства</h2> + +<p><em>Наследует свойства от своего родителя, {{domxref("HTMLElement")}}, и {{domxref("LinkStyle")}}.</em></p> + +<dl> + <dt></dt> + <dt>{{domxref("HTMLLinkElement.as")}}</dt> + <dd>Это {{domxref("DOMString")}} представляющий тип контента загружаемый по HTML ссылке.</dd> + <dt>{{domxref("HTMLLinkElement.crossOrigin")}} {{experimental_inline}}</dt> + <dd>Is a {{domxref("DOMString")}} that corresponds to the CORS setting for this link element. See <a href="/ru/docs/HTML/CORS_settings_attributes" title="HTML/CORS settings attributes">CORS settings attributes</a> for details.</dd> + <dt>{{domxref("HTMLLinkElement.disabled")}}</dt> + <dd>Is a <code>Boolean</code> which represents whether the link is disabled; currently only used with style sheet links.</dd> + <dt>{{domxref("HTMLLinkElement.href")}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the URI for the target resource.</dd> + <dt>{{domxref("HTMLLinkElement.hreflang")}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the language code for the linked resource.</dd> + <dt>{{domxref("HTMLLinkElement.media")}}</dt> + <dd>Is a {{domxref("DOMString")}} representing a list of one or more media formats to which the resource applies.</dd> + <dt>{{domxref("HTMLLinkElement.referrerPolicy")}} {{experimental_inline}}</dt> + <dd>Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("referrerpolicy", "link")}} HTML attribute indicating which referrer to use.</dd> + <dt>{{domxref("HTMLLinkElement.rel")}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the forward relationship of the linked resource from the document to the resource.</dd> + <dt>{{domxref("HTMLLinkElement.relList")}} {{readonlyInline}}</dt> + <dd>Is a {{domxref("DOMTokenList")}} that reflects the {{htmlattrxref("rel", "link")}} HTML attribute, as a list of tokens.</dd> + <dt>{{domxref("HTMLLinkElement.sizes")}} {{readonlyInline}}</dt> + <dd>Is a {{domxref("DOMSettableTokenList")}} that reflects the {{htmlattrxref("sizes", "link")}} HTML attribute, as a list of tokens.</dd> + <dt>{{domxref("LinkStyle.sheet")}} {{readonlyInline}}</dt> + <dd>Returns the {{domxref("StyleSheet")}} object associated with the given element, or <code>null</code> if there is none.</dd> + <dt>{{domxref("HTMLLinkElement.type")}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the MIME type of the linked resource.</dd> +</dl> + +<h3 id="Устаревшие_свойства">Устаревшие свойства</h3> + +<dl> + <dt>{{domxref("HTMLLinkElement.charset")}} {{obsolete_inline}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the character encoding for the target resource.</dd> + <dt>{{domxref("HTMLLinkElement.rev")}} {{obsolete_inline}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the reverse relationship of the linked resource from the resource to the document. + <div class="note"><strong>Примечание</strong>: Currently the W3C HTML 5.2 spec states that <code>rev</code> is no longer obsolete, whereas the WHATWG living standard still has it labeled obsolete. Until this discrepancy is resolved, you should still assume it is obsolete.</div> + </dd> + <dt>{{domxref("HTMLLinkElement.target")}} {{obsolete_inline}}</dt> + <dd>Is a {{domxref("DOMString")}} representing the name of the target frame to which the resource applies.</dd> +</dl> + +<h2 id="Методы">Методы</h2> + +<p><em>Не имеет методов; наследует методы от своего родителя, {{domxref("HTMLElement")}}</em><em>, и {{domxref("LinkStyle")}}.</em></p> + +<h2 id="Спецификации">Спецификации</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName("Preload")}}</td> + <td>{{Spec2("Preload")}}</td> + <td>Defines <code><link rel="preload"></code>, and the <code>as</code> property. Note that currently Firefox only supports preloading of cacheable resources.</td> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', "#htmllinkelement", "HTMLLinkElement")}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>Adds the following properties: <code>crossOrigin</code>, <code>referrerPolicy</code>, and <code>as</code>.</td> + </tr> + <tr> + <td>{{SpecName('HTML5.1', "document-metadata.html#the-link-element", "HTMLLinkElement")}}</td> + <td>{{Spec2('HTML5.1')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', "document-metadata.html#the-link-element", "HTMLLinkElement")}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>The following properties are now obsolete: <code>charset</code>, <code>rev</code>, and <code>shape</code>.<br> + The following properties have been added: <code>relList</code>, and <code>sizes</code>.</td> + </tr> + <tr> + <td>{{SpecName('DOM2 HTML', 'html.html#ID-35143001', 'HTMLLinkElement')}}</td> + <td>{{Spec2('DOM2 HTML')}}</td> + <td>Added a second inheritence, the {{domxref("LinkStyle")}} interface.</td> + </tr> + <tr> + <td>{{SpecName('DOM1', 'level-one-html.html#ID-35143001', 'HTMLLinkElement')}}</td> + <td>{{Spec2('DOM1')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Совместимость_браузера">Совместимость браузера</h2> + +<div> + + +<p>{{Compat("api.HTMLLinkElement")}}</p> +</div> + +<h2 id="Смотрите_также">Смотрите также</h2> + +<ul> + <li>Элемент HTML, реализующий этот интерфейс: {{HTMLElement("link")}}.</li> +</ul> |