Skip to main content
Version: 4.0.1

URL.toString()

The URL.toString() method returns a string containing the whole URL. It is effectively a read-only version of URL.prototype.href.

Syntax​

toString()

Parameters​

None.

Return value​

A string.