Fixed it by using New URI(window.location). But think it should work by using new URI( {base: true/false} ) ;
On Nov 13, 10:37 pm, Lennart <lenn...@pilon.nl> wrote: > That just gives me the base href. > > On Nov 13, 7:21 pm, Fli7e <ultrakr...@googlemail.com> wrote: > > > > > > > > > Have you simly tried: > > > URI.base.toString() > > > Uri.base is auto-created on load and the toString() will return the > > full location content. > > > On 13 Nov., 17:26, Lennart <lenn...@pilon.nl> wrote: > > > > I'm trying to get the window.location, but using the URI class (i want > > > to set some data in the querystring later). My page has a base href > > > (https://www.domain.ext/foo/), the actual window.location > > > ishttps://www.domain.ext/foo/bar. > > > > If I try new URI().toString(), it gives me the base href, which isn't > > > what I need. > > > > I tried new URI({base: false}).toString(), which gives output like > > > this:https://www.domain.ext/foo/[object Object]. Same goes if base is > > > set to true. > > > > I'm looking for the full uri (https://www.domain.ext/foo/bar), which > > > window.location gives me. > > > > Is this behaviour a bug or am I not seeing something?