---
title: "HTMLHyperlinkElementUtils | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface HTMLHyperlinkElementUtils

interface HTMLHyperlinkElementUtils {  
    [hash](#hash): string;  
    [host](#host): string;  
    [hostname](#hostname): string;  
    [href](#href): string;  
    [origin](#origin): string;  
    [password](#password): string;  
    [pathname](#pathname): string;  
    [port](#port): string;  
    [protocol](#protocol): string;  
    [search](#search): string;  
    [username](#username): string;  
    [toString](#tostring-1)(): string;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.HTMLHyperlinkElementUtils))

-   HTMLHyperlinkElementUtils
    -   [HTMLAnchorElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLAnchorElement/)
    -   [HTMLAreaElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLAreaElement/)

##### Index

### Properties[](#properties)

[hash](#hash) [host](#host) [hostname](#hostname) [href](#href) [origin](#origin) [password](#password) [pathname](#pathname) [port](#port) [protocol](#protocol) [search](#search) [username](#username)

### Methods[](#methods)

[toString](#tostring)

## Properties[](#properties-1)

### hash[](#hash)

hash: string

Returns the hyperlink's URL's fragment (includes leading "#" if non-empty).

Can be set, to change the URL's fragment (ignores leading "#").

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash)

### host[](#host)

host: string

Returns the hyperlink's URL's host and port (if different from the default port for the scheme).

Can be set, to change the URL's host and port.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/host)

### hostname[](#hostname)

hostname: string

Returns the hyperlink's URL's host.

Can be set, to change the URL's host.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hostname)

### href[](#href)

href: string

Returns the hyperlink's URL.

Can be set, to change the URL.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/href)

### `Readonly`origin[](#origin)

origin: string

Returns the hyperlink's URL's origin.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/origin)

### password[](#password)

password: string

Returns the hyperlink's URL's password.

Can be set, to change the URL's password.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password)

### pathname[](#pathname)

pathname: string

Returns the hyperlink's URL's path.

Can be set, to change the URL's path.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/pathname)

### port[](#port)

port: string

Returns the hyperlink's URL's port.

Can be set, to change the URL's port.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/port)

### protocol[](#protocol)

protocol: string

Returns the hyperlink's URL's scheme.

Can be set, to change the URL's scheme.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/protocol)

### search[](#search)

search: string

Returns the hyperlink's URL's query (includes leading "?" if non-empty).

Can be set, to change the URL's query (ignores leading "?").

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/search)

### username[](#username)

username: string

Returns the hyperlink's URL's username.

Can be set, to change the URL's username.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)

## Methods[](#methods-1)

### toString[](#tostring)

-   toString(): string[](#tostring-1)
    
    #### Returns string
