{"name":"crossvent","description":"Cross-platform browser event handling","version":"1.5.5","homepage":"https://github.com/bevacqua/crossvent","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://bevacqua.io"},"license":"MIT","repository":{"type":"git","url":"git://github.com/bevacqua/crossvent.git"},"main":"src/crossvent.js","devDependencies":{"browserify":"^4.1.3","contra":"^1.6.10","gulp":"^3.6.2","gulp-bump":"~0.1.0","gulp-clean":"~0.2.3","gulp-git":"~0.2.0","gulp-header":"^1.0.2","gulp-rename":"~0.2.2","gulp-size":"~0.1.1","gulp-streamify":"0.0.5","gulp-uglify":"~0.1.0","gzip-size":"^1.0.0","jquery":"^1.11.1","pretty-bytes":"^1.0.1","vinyl-source-stream":"^0.1.1"},"dependencies":{"custom-event":"^1.0.0"},"gitHead":"3496ee482e7f13536cef7fc6b66f1ecff758e91c","bugs":{"url":"https://github.com/bevacqua/crossvent/issues"},"_id":"crossvent@1.5.5","scripts":{},"_shasum":"ad20878e4921e9be73d9d6976f8b2ecd0f71a0b1","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.8.0","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"dist":{"shasum":"ad20878e4921e9be73d9d6976f8b2ecd0f71a0b1","tarball":"http://registry-npm.ywwl.com/crossvent/download/crossvent-1.5.5.tgz","integrity":"sha512-MY4xhBYEnVi+pmTpHCOCsCLYczc0PVtGdPBz6NXNXxikLaUZo4HdAeUb1UqAo3t3yXAloSelTmfxJ+/oUqkW5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDELw6RCzBkJlL5Jp8h9vYKTMzpbl+SmtpYvCbEEAqOEAIgaMbMGLgcQr/W3XCRLwF5v+sW9KN2OqFBH4qbkdje4bo="}],"size":9008,"noattachment":false,"key":"/crossvent/-/crossvent-1.5.5.tgz"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/crossvent-1.5.5.tgz_1476818182293_0.934357215417549"},"directories":{},"readme":"# crossvent\n\n> Cross-platform browser event handling\n\nThe event handler API used by [dominus][1].\n\n# Install\n\nUsing Bower\n\n```shell\nbower install -S crossvent\n```\n\nUsing `npm`\n\n```shell\nnpm install -S crossvent\n```\n\n# API\n\nThe API exposes a few methods that let you deal with event handling in a consistent manner across browsers.\n\n### `crossvent.add(el, type, fn, capturing?)`\n\nAdds an event listener `fn` of type `type` to DOM element `el`.\n\n```js\ncrossvent.add(document.body, 'click', function (e) {\n  console.log('clicked document body');\n});\n```\n\n### `crossvent.remove(el, type, fn, capturing?)`\n\nRemoves an event listener `fn` of type `type` from DOM element `el`.\n\n```js\ncrossvent.add(document.body, 'click', clicked);\ncrossvent.remove(document.body, 'click', clicked);\n\nfunction clicked (e) {\n  console.log('clicked document body');\n}\n```\n\n### `crossvent.fabricate(el, type, model?)`\n\nCreates a synthetic custom event of type `type` and dispatches it on `el`. You can provide a custom `model` which will be accessible as `e.detail`.\n\n```js\ncrossvent.add(document.body, 'sugar', sugary);\ncrossvent.fabricate(document.body, 'sugar', { onTop: true });\n\nfunction sugary (e) {\n  console.log('synthetic sugar' + e.detail.onTop ? ' on top' : '');\n}\n```\n\n# License\n\nMIT\n\n[1]: https://github.com/bevacqua/dominus\n","publish_time":1476818182540,"_cnpm_publish_time":1476818182540,"dist-tags":{"latest":"1.5.5"}}