From 3f5bd3dd3af02893cb216dc2866a8149377a1f2b Mon Sep 17 00:00:00 2001 From: Joe Barnes Date: Fri, 10 Jan 2014 15:02:11 -0600 Subject: [PATCH] Implemented get/set pathname for HTMLAnchorElement --- src/html/a.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/html/a.js b/src/html/a.js index d370b3bf..40d460c8 100644 --- a/src/html/a.js +++ b/src/html/a.js @@ -60,6 +60,15 @@ __extend__(HTMLAnchorElement.prototype, { set name(val) { this.setAttribute("name",val); }, + get pathname() { + var uri = Envjs.urlsplit(this.href); + return uri.path; + }, + set pathname(val) { + var uri = Envjs.urlsplit(this.href); + uri.path = val + this.href(uri.urlunsplit(uri)); + }, get rel() { return this.getAttribute("rel")||''; },