Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
remove hash from url before path processing
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed May 30, 2013
1 parent 2e7365b commit d699310
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/HTMLImports.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,16 @@ var path = {
return inNode.getAttribute("href") || inNode.getAttribute("src");
},
documentUrlFromNode: function(inNode) {
var url = path.getDocumentUrl(inNode.ownerDocument);
// take only the left side if there is a #
url = url.split('#')[0];
return url;
return path.getDocumentUrl(inNode.ownerDocument);
},
getDocumentUrl: function(inDocument) {
return inDocument &&
var url = inDocument &&
// TODO(sjmiles): ShadowDOMPolyfill intrusion
(inDocument._URL || (inDocument.impl && inDocument.impl._URL)
|| inDocument.baseURI || inDocument.URL)
|| '';
// take only the left side if there is a #
return url.split('#')[0];
},
resolveUrl: function(inBaseUrl, inUrl, inRelativeToDocument) {
if (this.isAbsUrl(inUrl)) {
Expand Down

0 comments on commit d699310

Please sign in to comment.