Location.origin - Web documentation
property Location.origin

Returns the Location object's URL's origin.

Type

string