Permalink
Browse files

Merge pull request #21 from mattoshry/master

implement url resolve for rhino/java impl
  • Loading branch information...
2 parents 71c9914 + c7e80e1 commit 7ae8153ceddb49b4978faa667f45bc3a7b38a326 @jbeard4 committed Jun 7, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/rhino/url.js
View
@@ -33,5 +33,10 @@ module.exports = {
//create a new url, and return a string
return String((new Packages.java.net.URL(urlObject.protocol, urlObject.host, urlObject.port, newPath)).toString());
+ },
+
+ resolve: function(base, target) {
+ var newUrl = new Packages.java.net.URL(new Packages.java.net.URL(base), target);
+ return newUrl.toString();
}
};

0 comments on commit 7ae8153

Please sign in to comment.