pub fn to_url(&self) -> Url {
        // Location.href is always a valid URL.
        match Url::parse(self.inner.href().unwrap_throw().as_ref()) {
            Ok(url) => url,
            Err(err) => throw_val(err.into()),
        }
    }
// Prefer an interface that exposes getting the URL, then manipulate the URL object, then set
// it back with `assign` or `replace`, over setting individual parts of the URL through the
// location interface. Avoids many methods that would all have to deal with SecurityErrors and
// avoids having to deal with syntax errors here.
Prefer an interface that exposes getting the URL, then manipulate the URL object, then set
it back with `assign` or `replace`, over setting individual parts of the URL through the
location interface. Avoids many methods that would all have to deal with SecurityErrors and
avoids having to deal with syntax errors here.
Prefer an interface that exposes getting the URL then manipulate the URL object then set it back with ` assign ` or ` replace ` over setting individual parts of the URL through the location interface . Avoids many methods that would all have to deal with SecurityErrors and avoids having to deal with syntax errors here .
pub fn to_url(&self) -> Url {
        // Location.href is always a valid URL.
        match Url::parse(self.inner.href().unwrap_throw().as_ref()) {
            Ok(url) => url,
            Err(err) => throw_val(err.into()),
        }
    }
pub fn to_url ( & self ) -> Url { // Location.href is always a valid URL. match Url :: parse ( self . inner . href ( ) . unwrap_throw ( ) . as_ref ( ) ) { Ok ( url ) => url , Err ( err ) => throw_val ( err . into ( ) ) , } }
Prefer an interface that exposes getting the URL, then manipulate the URL object, then set
it back with `assign` or `replace`, over setting individual parts of the URL through the
location interface.
Prefer an interface that exposes getting the URL then manipulate the URL object then set it back with ` assign ` or ` replace ` over setting individual parts of the URL through the location interface .
&self
&self