Этот перевод не завершён. Пожалуйста, помогите перевести эту статью с английского

Это экспериментальная технология
Так как спецификация этой технологии ещё не стабилизировалась, смотрите таблицу совместимости по поводу использования в различных браузерах. Также заметьте, что синтаксис и поведение экспериментальной технологии может измениться в будущих версиях браузеров, вслед за изменениями спецификации.

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with HTMLAnchorElement and HTMLAreaElement. These utilities allow to deal with common features like URLs.

There are no objects of this type, but several objects HTMLAnchorElement and HTMLAreaElement implement it.


This interface doesn't inherit any property.

Is a USVString containing the whole URL.
Is a USVString containing the protocol scheme of the URL, including the final ':'.
Is a USVString containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
Is a USVString containing the domain of the URL.
Is a USVString containing the port number of the URL.
Is a USVString containing an initial '/' followed by the path of the URL.
Is a USVString containing a '?' followed by the parameters of the URL.
Is a USVString containing a '#' followed by the fragment identifier of the URL.
Is a USVString containing the username specified before the domain name.
Is a USVString containing the password specified before the domain name.
HTMLHyperlinkElementUtils.origin Только для чтения
Returns a USVString containing the origin of the URL, that is its scheme, its domain and its port.


This interface doesn't inherit any method.

Returns a DOMString containing the whole URL. It is a synonym for HTMLHyperlinkElementUtils.href, though it can't be used to modify the value.


Specification Status Comment
HTML Living Standard
Определение 'HTMLHyperlinkElementUtils' в этой спецификации.
Живой стандарт Initial definition

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Нет [1] 22 (22) [2] Нет [1] Нет [1] Нет [1]
username and password ? 26 (26) [2] Нет ? ?
origin (Да) 26 (26) [2] ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Нет [1] Нет [1] 22.0 (22) [2] Нет [1] Нет [1] Нет [1]
username and password ? ? 26.0 (26) [2] Нет ? ?
origin ? ? 26.0 (26) [2] ? ? ?

[1] Though not grouped in a single abstract interface, these methods are directly available on the interfaces that implement it, if this interface is supported.

[2] This mixin was called URLUtils before Firefox 45, and was also implemented to other by other interfaces, like Location. From Firefox 45, the other interfaces implements their own version of the properties and methods they need.

See also