How to build an URL and its search parameters with JavaScript (the URL API)