{"id":16309118,"url":"https://github.com/susisu/ev","last_synced_at":"2025-10-25T14:31:44.762Z","repository":{"id":57222026,"uuid":"28259996","full_name":"susisu/eV","owner":"susisu","description":"A simple DOM-like event system","archived":false,"fork":false,"pushed_at":"2015-07-31T06:32:35.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-04T18:03:12.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/susisu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-20T07:11:34.000Z","updated_at":"2014-12-22T16:32:54.000Z","dependencies_parsed_at":"2022-09-04T06:50:57.851Z","dependency_job_id":null,"html_url":"https://github.com/susisu/eV","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FeV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FeV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FeV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FeV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/susisu","download_url":"https://codeload.github.com/susisu/eV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865424,"owners_count":16555929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T21:19:41.901Z","updated_at":"2025-10-25T14:31:44.381Z","avatar_url":"https://github.com/susisu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eV\nThe eV (electronvolt) provides a simple DOM-like event system.\n\n## Installation\n``` shell\n$ npm install electronvolt\n```\n\n## Example\n``` javascript\nvar ev = require(\"electronvolt\");\n\n// create event nodes\nvar node = new ev.EventNode();\nvar parent = new ev.EventNode();\n\n// compose event flow\nnode.parentNode = parent;\n\nvar listener = function (event) {\n    switch (event.eventPhase) {\n        case ev.EventPhase.AT_TARGET:\n            console.log(\"at target\");\n            break;\n        case ev.EventPhase.BUBBLING_PHASE:\n            console.log(\"bubbling phase\");\n            break;\n        case ev.EventPhase.CAPTURING_PHASE:\n            console.log(\"capturing phase\");\n            break;\n    }\n};\n\n// add event listeners\nnode.addEventListener(\"example\", listener);\nparent.addEventListener(\"example\", listener);\nparent.addEventListener(\"example\", listener, true);\n\n// dispatch event into the event flow\nnode.dispatchEvent(new ev.Event(\"example\", true));\n// -\u003e capturing phase\n// -\u003e at target\n// -\u003e bubbling phase\n```\n\n## License\n[MIT License](http://opensource.org/licenses/mit-license.php)\n\n## Author\nSusisu ([GitHub](https://github.com/susisu), [Twitter](https://twitter.com/susisu2413))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusisu%2Fev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsusisu%2Fev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusisu%2Fev/lists"}