aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/url.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/url.rs')
-rw-r--r--components/script/dom/url.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs
index 1553e8b5b0a..8ecffe60b33 100644
--- a/components/script/dom/url.rs
+++ b/components/script/dom/url.rs
@@ -13,6 +13,7 @@ use dom::urlhelper::UrlHelper;
use dom::urlsearchparams::URLSearchParams;
use std::borrow::ToOwned;
use std::default::Default;
+use url::quirks::domain_to_unicode;
use url::{Host, Url};
// https://url.spec.whatwg.org/#url
@@ -100,6 +101,10 @@ impl URL {
USVString("".to_owned())
}
}
+
+ pub fn DomainToUnicode(_: GlobalRef, origin: USVString) -> USVString {
+ USVString(domain_to_unicode(&origin.0))
+ }
}
impl URLMethods for URL {