Navigation Menu

Skip to content

Commit

Permalink
Merge pull request LearnBoost#48 from bnoguchi/multi-host
Browse files Browse the repository at this point in the history
Added documentation comment to Browser#hostBrowser.
  • Loading branch information
rauchg committed Jul 1, 2011
2 parents 6fb8c86 + e7d32da commit 81d654b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/browser.js
Expand Up @@ -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))
Expand Down

0 comments on commit 81d654b

Please sign in to comment.