{"_id":"inspector","_rev":"18-0449d6295f0a93c2306e5a3f80d037d0","name":"inspector","description":"Node.js binding for WebKit Inspector API","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"inspector","description":"Node.js binding for WebKit Inspector API","version":"0.2.0","author":{"name":"Admazely","email":"dev@admaze.ly"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"main":"./inspector.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/inspector.git"},"keywords":["WebKit","inspector","Chrome","Safari","binding"],"dependencies":{"ws":"0.4.x","flower":"0.6.x"},"devDependencies":{"tap":"0.3.x","temp":"0.4.x","rimraf":"2.0.x","async":"0.1.x"},"license":"MIT","engines":{"node":"0.8","npm":"1"},"_id":"inspector@0.2.0","dist":{"shasum":"a0e7c3171b25007bddc4f57dc1cb339999f0f6a9","tarball":"https://registry.npmjs.org/inspector/-/inspector-0.2.0.tgz","integrity":"sha512-OrQklgNHpEQtLoiu25+Uy8DB34wNQkXkAhNcD/Q0jlMv1oTbaiL+loyo3FQS2MB6O8z+1t6uoZpRJ4RodmGJTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1xDf30vLFSiqvtGWh7kuSh7tvgTbe9DN7XdTWW4c5ZAiAilW8tbnmskiwueCLsWCSCE3uL/SAeSOx80QwIG/TBEw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"directories":{}},"0.3.0":{"name":"inspector","description":"Node.js binding for WebKit Inspector API","version":"0.3.0","author":{"name":"Admazely","email":"dev@admaze.ly"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"},{"name":"kesla","email":"david.bjorklund@gmail.com"}],"main":"./inspector.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/inspector.git"},"keywords":["WebKit","inspector","Chrome","Safari","binding"],"dependencies":{"ws":"0.4.x","flower":"0.6.x"},"devDependencies":{"tap":"0.3.x","temp":"0.4.x","rimraf":"2.0.x","async":"0.1.x"},"license":"MIT","engines":{"node":"0.8","npm":"1"},"_id":"inspector@0.3.0","dist":{"shasum":"e25c164dcb79a1a390d18538bb13123d379fb2d6","tarball":"https://registry.npmjs.org/inspector/-/inspector-0.3.0.tgz","integrity":"sha512-utjDjPmD62hNQ+g5p0+Wdzvzvy2ipLE38KkzDt3sb7g8FKi8veV3gm2rRzp1Ab6ZUcgurprc5ejibviIJAw2eA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp5mfRtKgrMoNgkKPMXU/KVRl0irMCmy9Lx6CArdI7MQIgKcBWjHxv54bftVHrO9xmPRwilxJAVYz7sSSxwSE0Bsc="}]},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"directories":{}},"0.3.1":{"name":"inspector","description":"Node.js binding for WebKit Inspector API","version":"0.3.1","author":{"name":"Admazely","email":"dev@admaze.ly"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"},{"name":"kesla","email":"david.bjorklund@gmail.com"}],"main":"./inspector.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/Admazely/inspector.git"},"keywords":["WebKit","inspector","Chrome","Safari","binding"],"dependencies":{"ws":"0.4.x","flower":"0.6.x"},"devDependencies":{"tap":"0.3.x","temp":"0.4.x","rimraf":"2.0.x","async":"0.1.x"},"license":"MIT","engines":{"node":"0.8","npm":"1"},"_id":"inspector@0.3.1","dist":{"shasum":"9c991b84883ad3777f492a62a5d6147363f7a66c","tarball":"https://registry.npmjs.org/inspector/-/inspector-0.3.1.tgz","integrity":"sha512-RuZayrPdA6HtJXJqS6ZQmrQXk0C/z0idA/bdpaqGUE6EyNcDblBrKg2adiBds04pgSkGdW47FNh3fFjdNthouQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX3E6socrudpMCU43i1H1P5fkZNB9WjnIU1lom409zpQIgEcONp9bVNhFn+eyAxcPy0KxTRaWIUz1/dXQxFFFYQFU="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"directories":{}},"0.4.0":{"name":"inspector","description":"Node.js binding for WebKit Inspector API","version":"0.4.0","author":{"name":"Admazely","email":"dev@admaze.ly"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"main":"./inspector.js","scripts":{"test":"tap ./test/simple"},"repository":{"type":"git","url":"git://github.com/Admazely/inspector.git"},"keywords":["WebKit","inspector","Chrome","Safari","binding"],"dependencies":{"ws":"0.4.x","endpoint":"0.4.x"},"devDependencies":{"tap":"0.4.x","temp":"0.6.x","async":"0.2.x","rimraf":"2.2.x"},"license":"MIT","bugs":{"url":"https://github.com/Admazely/inspector/issues"},"homepage":"https://github.com/Admazely/inspector","_id":"inspector@0.4.0","dist":{"shasum":"741d794009022ca53572fa90de8525a9a8140166","tarball":"https://registry.npmjs.org/inspector/-/inspector-0.4.0.tgz","integrity":"sha512-o4NoreZ75uESkL5ml8dhLwrf6wPejP87umTOszruLYn1Tjtqcp+ORQ6MDnPIzY/Qjpivn8cV4myWDj4cV450qA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDb8XeoSWYJ7MUVL9W8Css0TGTGmCOWZ84XndCCX94ZgIgTdyL4U9NhxlzfGj4dJzjT8V+Kyk/+/DMgkauaCZjSEw="}]},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"}},"0.5.0":{"name":"inspector","description":"Node.js binding for WebKit Inspector API","version":"0.5.0","author":{"name":"Admazely","email":"dev@admaze.ly"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"},{"name":"kesla","email":"david.bjorklund@gmail.com"}],"main":"./inspector.js","scripts":{"test":"tap ./test/simple","generate":"node build/download && node build/generate"},"repository":{"type":"git","url":"git://github.com/Admazely/inspector.git"},"keywords":["WebKit","inspector","Chrome","Safari","binding"],"dependencies":{"ws":"0.7.x","endpoint":"0.4.x"},"devDependencies":{"tap":"0.7.x","temp":"0.8.x","async":"0.9.x","rimraf":"2.3.x"},"license":"MIT","gitHead":"ef09d1d7fab7ab3973fc8b5d1d4f6a3b2e79a9b2","bugs":{"url":"https://github.com/Admazely/inspector/issues"},"homepage":"https://github.com/Admazely/inspector","_id":"inspector@0.5.0","_shasum":"a26465dcb58858352cf42977e691efacea88f501","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"dist":{"shasum":"a26465dcb58858352cf42977e691efacea88f501","tarball":"https://registry.npmjs.org/inspector/-/inspector-0.5.0.tgz","integrity":"sha512-qs91uK2uL3Bjcl+zSe088cR2Jh8TWgjifv54jsIvr593q92rUPFaTo+WZGvoyMgsRZWusZQR6JJmNA913QSZ+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChvXHVG/LA6eooQgcl/1cO8n/jgJJ3bAzSQKdU3CsnGgIgLeGZP3dDepGTbVeqKb8rEyVX5Hf7LNxHkTZuZAV53v4="}]}}},"readme":"# Inspector\n[![npm](http://img.shields.io/npm/v/inspector.svg?style=flat-square)](https://npmjs.com/inspector)\n[![npm downloads](http://img.shields.io/npm/dm/inspector.svg?style=flat-square)](https://npmjs.com/inspector)\n\n> Node.js binding for WebKit Inspector API\n\n## Example\n\n```JavaScript\nvar inspector = require('inspector');\n\nvar inspect = inspector(9222, '127.0.0.1', 'about:blank', function () {\n    inspect.Page.enable(function (error) {\n        if (error) throw error;\n\n        inspect.Page.once('loadEventFired', function (response) {\n            \n            // window.onload emitted at this time `timestamp`:\n            console.log(new Date(response.timestamp));\n        });\n    });\n});\n```\n\n## Generating the Library & Documentation\n\nThe code and documentation is generated from the [WebKit repository](https://github.com/WebKit/webkit/)'s debugger protocol specification files.\n**NOTE:** it's probably a good idea to remove the old files in `doc/` and `lib/` before regenerating them.\nTo generate the code & docs, run:\n\n```sh\n$ npm run generate\n```\n\n## API documetation\n\n### inspect = inspector(port, host, href, [callback])\n\nTo connect a remote WebKit inspector you must first start the WebKit instance\nwith the remote debugger enabled. In Chrome this is done by adding the\n`--remote-debugging-port=9222` process argument.\n\nThe inspector module will then try to connect to `http://127.0.0.1:9222/json`\nif a connection coundn't be made within 2 seconds, it will emit and `error`\nevent.\n\nBesides from the remote `port` and `host` you will also need to spefic the `href`\nof the page that the inspector should connect to. Note that the page must already\nbe open, before the inspector module can connect to it.\n\nThe optional `callback` is executed once the `connect` event emits. It will\ntherefor only executeif a connection could be established successfully.\n\n```JavaScript\nvar inspector = require('inspector');\n\nvar inspect = inspector(9222, '127.0.0.1', 'about:blank', function () {\n    // connected\n});\n```\n\n### inspect.close([callback])\n\nWill close the WebSocket connection or stop the inspector from atempting to make\na connection.\n\nOnce everything is closed the `close` event will emit.\n\nThe optional `callback` is executed once the `close` event emits.\n\n```JavaScript\ninspect.close(function () {\n    // inspector closed\n});\n```\n\n### inspect[domain]\n\nThe WebKit Inspector is splited up intro subparts (called domains).\n\nAll WebKit Inspector domains are documented in the\n[doc](https://github.com/Admazely/inspector/blob/master/doc/README.md)\ndirectory.\n\n#### inspect\\[domain\\]\\[command\\]\\(parameters [...], callback\\)\n\nCommands are executed by by adding a `[command]` to the domain object, and then\ncall it by adding parameters and `callback` as descibed in the\n[documentation](https://github.com/Admazely/inspector/blob/master/doc/README.md).\n\nThe callback is executed with an `error` argument there is either `null` or an\n`Error` type. The second argument is a response object.\n\n_Note that not all commands returns a `response` object._\n\nExample where the document title is returned:\n\n```JavaScript\ninspect.Runtime.evaluate(\"document.title;\", function (error, response) {\n    if (error) throw error;\n\n    // contains the document title\n    console.log(response.result.value);\n});\n```\n\n#### inspect[domain].on(eventname, callback)\n\nThe WebKit Inspector emits a lot of events, all events are associated with a\n`domain` and are therefore only emitted on a `domain` object.\n\nThe event handler is only emitted with a single parameter, there is a object\ncontaining properties as described in the\n[documentation](https://github.com/Admazely/inspector/blob/master/doc/README.md).\n\nExample on how to listen on the `loadEventFired`, note that you must call\n`Page.enable()` first.\n\n```JavaScript\ninspect.Page.once('loadEventFired', function (response) {\n    \n    // window.onload emitted at this time `timestamp`:\n    console.log(new Date(response.timestamp));\n});\n```\n\n_Note: if the event isn't supported the inspector module will throw._\n\n### Event: connect\n\nEmitted once a connection is successfully established.\n\n### Event: close\n\nEmitted once all connections are closed. This is usually after `inspect.close()`\nis called, but if the server closed the connection this event will also emit.\n\nOnce the `close` event has emitted the `inspect.closed` flag becomes `true`.\n\n### Event: error\n\nEmiited in case any error occurred. Note if you don't listen to this event\nthe error will be thrown.\n","maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"},{"name":"kesla","email":"david.bjorklund@gmail.com"}],"time":{"modified":"2022-06-19T01:33:01.414Z","created":"2012-11-20T13:31:54.842Z","0.2.0":"2012-11-20T13:31:57.849Z","0.3.0":"2013-02-09T19:47:40.651Z","0.3.1":"2013-03-25T09:32:28.236Z","0.4.0":"2014-01-25T12:40:14.128Z","0.5.0":"2015-03-14T17:29:11.954Z"},"author":{"name":"Admazely","email":"dev@admaze.ly"},"repository":{"type":"git","url":"git://github.com/Admazely/inspector.git"},"readmeFilename":"README.md","homepage":"https://github.com/Admazely/inspector","keywords":["WebKit","inspector","Chrome","Safari","binding"],"bugs":{"url":"https://github.com/Admazely/inspector/issues"},"license":"MIT","users":{"dosevader":true,"monolithed":true}}