Implement URL.domainToUnicode

This commit is contained in:
Achal Shah 2016-06-05 23:27:45 -07:00 committed by Achal Shah
parent 1bc94c132e
commit a727fd2d62
5 changed files with 37 additions and 10 deletions

View file

@ -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 {

View file

@ -7,7 +7,7 @@
Exposed=(Window,Worker)*/]
interface URL {
static USVString domainToASCII(USVString domain);
// static USVString domainToUnicode(USVString domain);
static USVString domainToUnicode(USVString domain);
[SetterThrows]
/*stringifier*/ attribute USVString href;