add readonly pathname function in location

pathname function implemented in UrlHelper
'url is null' check is skip for now
This commit is contained in:
yodalee 2015-03-27 22:42:56 +08:00
parent db104b738e
commit 77f3b25e65
3 changed files with 15 additions and 1 deletions

View file

@ -46,6 +46,10 @@ impl<'a> LocationMethods for JSRef<'a, Location> {
UrlHelper::Href(&self.get_url())
}
fn Pathname(self) -> USVString {
UrlHelper::Pathname(&self.get_url())
}
fn Stringify(self) -> DOMString {
self.Href().0
}