window.location.protocol = “http:”
window.location.host = “css-tricks.com”
window.location.pathname = “/example/index.html”
window.location.search = “?s=flexbox”const
postID = (new URLSearchParams(window.location.search)).get('post');
var url = new URL('http://megaimkon.loc/storage/photos/all_users/slider-1.jpg');
console.log(url.pathname)
const url = new URL(url [, base])
const response = await fetch(new URL('http://www.example.com/démonstration.html'));