diff --git a/lib/browser.js b/lib/browser.js index 5d8cabd..6730451 100644 --- a/lib/browser.js +++ b/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))