Permalink
Browse files

similar to pull request 10 for node. this is the analog for java/rhino

  • Loading branch information...
Matt Oshry
Matt Oshry committed Jun 7, 2013
1 parent 1b0f135 commit c7e80e115afb0497ab0d6e263e62e825c4ff306f
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 c7e80e1

Please sign in to comment.