add origin to location and url api

This commit is contained in:
Chandler Abraham 2016-01-21 11:06:41 -08:00
parent 1ba1fb0b7f
commit 1ee9ccba21
11 changed files with 62 additions and 607 deletions

View file

@ -176,6 +176,11 @@ impl URLMethods for URL {
UrlHelper::SetProtocol(&mut self.url.borrow_mut(), value);
}
// https://url.spec.whatwg.org/#dom-url-origin
fn Origin(&self) -> USVString {
UrlHelper::Origin(&self.url.borrow())
}
// https://url.spec.whatwg.org/#dom-url-search
fn Search(&self) -> USVString {
UrlHelper::Search(&self.url.borrow())