we have a nifty utility for this, check out `urlResolve(url).href` in `urlUtils.js`