WebURLURL.originproperty URL.originThe origin property of the URL interface is a string that represents the origin of the URL, that is the URL.protocol, URL.host, and URL.port. Examples ##const myURL = new URL('https://foo.example.org/bar'); console.log(myURL.origin); // Logs "https://foo.example.org" #const myURL = new URL('https://example.org:8080/foo'); console.log(myURL.origin); // Logs "https://example.org:8080" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/origin
property URL.originThe origin property of the URL interface is a string that represents the origin of the URL, that is the URL.protocol, URL.host, and URL.port. Examples ##const myURL = new URL('https://foo.example.org/bar'); console.log(myURL.origin); // Logs "https://foo.example.org" #const myURL = new URL('https://example.org:8080/foo'); console.log(myURL.origin); // Logs "https://example.org:8080" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/origin