Topmarks/chrome-helper

View on GitHub
docs.json

Summary

Maintainability
Test Coverage
{"language":"javascript","client_name":"inchjs","args":[],"client_version":"0.4.1","git_repo_url":"git@github.com:Topmarks/chrome-helper.git","branch_name":"master","objects":[{"comment":"/**\n*  Private: makes a delay a promise\n*\n*  ## Example\n*\n*     this.closeTab(tab).then(delay);\n*     // it takes chrome a couple seconds to realize a tab has closed.\n*\n*  Returns a {Promise}\n*/","meta":{"range":[286,386],"filename":"chrome-helper.js","lineno":14,"path":"/src","code":{"id":"astnode100000006","name":"delay","type":"ArrowFunctionExpression"},"vars":{"":null}},"description":"Private: makes a delay a promise\n\n ## Example\n\n    this.closeTab(tab).then(delay);\n    // it takes chrome a couple seconds to realize a tab has closed.\n\n Returns a {Promise}","name":"delay","longname":"delay","kind":"function","scope":"global"},{"comment":"","meta":{"range":[394,469],"filename":"chrome-helper.js","lineno":20,"path":"/src","code":{"id":"astnode100000024","name":"tabNotOpenError","type":"Literal","value":"No valid tab provided as a parameter or set to this.tab"}},"undocumented":true,"name":"tabNotOpenError","longname":"tabNotOpenError","kind":"constant","scope":"global"},{"comment":"/**\n* Topmark ChromeHelper\n*/","meta":{"range":[503,4940],"filename":"chrome-helper.js","lineno":24,"path":"/src","code":{"id":"astnode100000027","name":"module.exports","type":"ClassDeclaration"}},"classdesc":"Topmark ChromeHelper","name":"exports","longname":"module.exports","kind":"class","memberof":"module","scope":"static"},{"comment":"/**\n* Topmark ChromeHelper\n*/","meta":{"range":[518,4940],"filename":"chrome-helper.js","lineno":24,"path":"/src","code":{"id":"astnode100000028","name":"ChromeHelper","type":"ClassDeclaration","paramnames":["port","url"]}},"undocumented":true,"name":"ChromeHelper","longname":"ChromeHelper","kind":"class","scope":"global"},{"comment":"/**\n*  Public: initiates ChromeHelper and pass defaults through\n*\n*  * `port` an (optional) {Int} of the debugging port the browser is using\n*  * `url` an (optional) {String} of the url. Often used when opening new tabs.\n*/","meta":{"range":[782,875],"filename":"chrome-helper.js","lineno":31,"path":"/src","code":{"id":"astnode100000031","name":"ChromeHelper","type":"MethodDefinition","paramnames":["port","url"]},"vars":{"":null}},"description":"Public: initiates ChromeHelper and pass defaults through\n\n * `port` an (optional) {Int} of the debugging port the browser is using\n * `url` an (optional) {String} of the url. Often used when opening new tabs.","name":"ChromeHelper","longname":"ChromeHelper","kind":"class","scope":"global"},{"comment":"/**\n*  Public: opens a new tab (using the constructor port and url) and creates\n*  a new chrome connection. The results are returned as an array and set on\n*  the class instance as `this.tab` and `this.chrome`.\n*\n*  ## Example\n*\n*     const chromeHelper = new ChromeHelper();\n*     chromeHelper.startupChrome().then((results) => {\n*       console.log(results[0]); // the newly opened tab.\n*       console.log(results[1]); // the chrome connection.\n*     });\n*\n*  Returns a {Promise} which resolves with an {Array} of results.\n*  [0] is the tab opened, [1] is the chrome connection.\n*/","meta":{"range":[1510,1763],"filename":"chrome-helper.js","lineno":51,"path":"/src","code":{"id":"astnode100000053","name":"ChromeHelper#startupChrome","type":"MethodDefinition","paramnames":[]},"vars":{"":null}},"description":"Public: opens a new tab (using the constructor port and url) and creates\n a new chrome connection. The results are returned as an array and set on\n the class instance as `this.tab` and `this.chrome`.\n\n ## Example\n\n    const chromeHelper = new ChromeHelper();\n    chromeHelper.startupChrome().then((results) => {\n      console.log(results[0]); // the newly opened tab.\n      console.log(results[1]); // the chrome connection.\n    });\n\n Returns a {Promise} which resolves with an {Array} of results.\n [0] is the tab opened, [1] is the chrome connection.","name":"startupChrome","longname":"ChromeHelper#startupChrome","kind":"function","memberof":"ChromeHelper","scope":"instance"},{"comment":"/**\n*  Public: checks if there is a valid tab as a parameter or set on the instance.\n*\n*  * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n*\n*  ## Example\n*\n*     this.checkTab(tab).then(this.closeTab);\n*\n*  Returns a {Promise}; rejects if no valid tab available.\n*/","meta":{"range":[2095,2389],"filename":"chrome-helper.js","lineno":72,"path":"/src","code":{"id":"astnode100000107","name":"ChromeHelper#checkTab","type":"MethodDefinition","paramnames":["tab"]},"vars":{"":null}},"description":"Public: checks if there is a valid tab as a parameter or set on the instance.\n\n * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n\n ## Example\n\n    this.checkTab(tab).then(this.closeTab);\n\n Returns a {Promise}; rejects if no valid tab available.","name":"checkTab","longname":"ChromeHelper#checkTab","kind":"function","memberof":"ChromeHelper","scope":"instance"},{"comment":"/**\n*  Public: closes a tab (if not specificed it uses `chromeHelper.tab` if available).\n*\n*  * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n*\n*  ## Example\n*\n*     const chromeHelper = new ChromeHelper();\n*     chromeHelper.startupChrome().then(() => chromeHelper.shutdownChrome());\n*\n*  Returns a {Promise}.\n*/","meta":{"range":[2772,2962],"filename":"chrome-helper.js","lineno":94,"path":"/src","code":{"id":"astnode100000159","name":"ChromeHelper#shutdownChrome","type":"MethodDefinition","paramnames":["tab"]},"vars":{"":null}},"description":"Public: closes a tab (if not specificed it uses `chromeHelper.tab` if available).\n\n * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n\n ## Example\n\n    const chromeHelper = new ChromeHelper();\n    chromeHelper.startupChrome().then(() => chromeHelper.shutdownChrome());\n\n Returns a {Promise}.","name":"shutdownChrome","longname":"ChromeHelper#shutdownChrome","kind":"function","memberof":"ChromeHelper","scope":"instance"},{"comment":"/**\n*  Public: closes a tab (if not specificed it uses `chromeHelper.tab` if available).\n*\n*  * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n*\n*  ## Example\n*\n*     const chromeHelper = new ChromeHelper();\n*     chromeHelper.startupChrome().then(() => chromeHelper.shutdownChrome());\n*\n*  Returns a {Promise}.\n*/","meta":{"range":[3345,3473],"filename":"chrome-helper.js","lineno":114,"path":"/src","code":{"id":"astnode100000197","name":"ChromeHelper#closeTab","type":"MethodDefinition","paramnames":["tab"]},"vars":{"":null}},"description":"Public: closes a tab (if not specificed it uses `chromeHelper.tab` if available).\n\n * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n\n ## Example\n\n    const chromeHelper = new ChromeHelper();\n    chromeHelper.startupChrome().then(() => chromeHelper.shutdownChrome());\n\n Returns a {Promise}.","name":"closeTab","longname":"ChromeHelper#closeTab","kind":"function","memberof":"ChromeHelper","scope":"instance"},{"comment":"/**\n*  Public: checks if a tab is open.\n*\n*  * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n*\n*  ## Example\n*\n*     const chromeHelper = new ChromeHelper();\n*     chromeHelper.isTabOpen().then((result) => console.log(result));\n*     // a boolean\n*\n*  Returns a {Promise} which resolves to a {Bool}.\n*/","meta":{"range":[3848,4409],"filename":"chrome-helper.js","lineno":131,"path":"/src","code":{"id":"astnode100000226","name":"ChromeHelper#isTabOpen","type":"MethodDefinition","paramnames":["tab"]},"vars":{"":null}},"description":"Public: checks if a tab is open.\n\n * `tab` an optional {Tab} object. Defaults to this.tab set by `startupChrome`.\n\n ## Example\n\n    const chromeHelper = new ChromeHelper();\n    chromeHelper.isTabOpen().then((result) => console.log(result));\n    // a boolean\n\n Returns a {Promise} which resolves to a {Bool}.","name":"isTabOpen","longname":"ChromeHelper#isTabOpen","kind":"function","memberof":"ChromeHelper","scope":"instance"},{"comment":"/**\n*  Public: closes all the open tabs in chrome, then adds a delay to make to\n*  ensure Chrome can accurately report what tabs are open.\n*\n*  ## Example\n*\n*     const chromeHelper = new ChromeHelper();\n*     chromeHelper.closeAllTabs()\n*\n*  Returns a {Promise}.\n*/","meta":{"range":[4711,4938],"filename":"chrome-helper.js","lineno":162,"path":"/src","code":{"id":"astnode100000319","name":"ChromeHelper#closeAllTabs","type":"MethodDefinition","paramnames":[]},"vars":{"":null}},"description":"Public: closes all the open tabs in chrome, then adds a delay to make to\n ensure Chrome can accurately report what tabs are open.\n\n ## Example\n\n    const chromeHelper = new ChromeHelper();\n    chromeHelper.closeAllTabs()\n\n Returns a {Promise}.","name":"closeAllTabs","longname":"ChromeHelper#closeAllTabs","kind":"function","memberof":"ChromeHelper","scope":"instance"}]}