Skip to content

Commit

Permalink
merging thebigbad's relative url lookup fix (href)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpvar committed Nov 25, 2010
2 parents 4b3ce69 + 71f1a26 commit 462ef4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/jsdom/level2/html.js
Expand Up @@ -430,6 +430,11 @@ define('HTMLFormElement', {

define('HTMLLinkElement', {
tagName: 'LINK',
proto: {
get href() {
return core.resourceLoader.resolve(this.ownerDocument, this.getAttribute('href'));
}
},
attributes: [
{prop: 'disabled', type: 'boolean'},
'charset',
Expand Down Expand Up @@ -969,7 +974,7 @@ define('HTMLAnchorElement', {
focus: function() {
},
get href() {
return this.getAttribute('href').replace(/^\.\//,'/');
return core.resourceLoader.resolve(this.ownerDocument, this.getAttribute('href'));
}
},
attributes: [
Expand Down

0 comments on commit 462ef4a

Please sign in to comment.