diff options
author | Achal Shah <achals@gmail.com> | 2016-06-05 23:27:45 -0700 |
---|---|---|
committer | Achal Shah <achal@uber.com> | 2016-06-06 10:58:37 -0700 |
commit | a727fd2d6207fc9cf1215d0031b2c904f396590c (patch) | |
tree | ef3a9fc1bc12391a241f661304f482137506e45b /components/script/dom/url.rs | |
parent | 1bc94c132e6820293c2178bf95991518b1e8a677 (diff) | |
download | servo-a727fd2d6207fc9cf1215d0031b2c904f396590c.tar.gz servo-a727fd2d6207fc9cf1215d0031b2c904f396590c.zip |
Implement URL.domainToUnicode
Diffstat (limited to 'components/script/dom/url.rs')
-rw-r--r-- | components/script/dom/url.rs | 5 |
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 { |