Skip to content
Browse files

Added documentation comment to Browser#hostBrowser.

  • Loading branch information...
1 parent 4fd16e3 commit e7d32daf665f6136a571dc8faf2e386ae6c96441 @bnoguchi bnoguchi committed Jul 1, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/browser.js
View
9 lib/browser.js
@@ -116,6 +116,15 @@ Browser.prototype.context = function(selector, fn){
return this;
};
+/**
+ * Finds or creates/caches a Browser instance associated with the port
+ * and hostname of `uri`. If a new Browser is created, then the source
+ * Browser's User-Agent (if it is set) is copied to the new Browser.
+ *
+ * @param {Object} uri is an object returned from `require('url').parse(someUrl)`
+ * @return {Browser} the Browser associated with uri
+ * @api public
+ */
Browser.prototype.hostBrowser = function(uri) {
var otherHostname = uri.hostname
, port = uri.port || (uri.protocol === 'https:' ? 443 : (this.port || 80))

0 comments on commit e7d32da

Please sign in to comment.
Something went wrong with that request. Please try again.