{"id":16718211,"url":"https://github.com/allouis/copy-event-attributes","last_synced_at":"2025-06-12T13:38:17.529Z","repository":{"id":57207228,"uuid":"56918921","full_name":"allouis/copy-event-attributes","owner":"allouis","description":"🔥  copies event attributes between DOM elements 🔥 🔥 designed for use with morphdom 🔥","archived":false,"fork":false,"pushed_at":"2016-12-13T11:21:33.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T00:51:17.960Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allouis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-23T12:49:53.000Z","updated_at":"2018-05-31T05:18:39.000Z","dependencies_parsed_at":"2022-09-11T05:30:26.953Z","dependency_job_id":null,"html_url":"https://github.com/allouis/copy-event-attributes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allouis%2Fcopy-event-attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allouis%2Fcopy-event-attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allouis%2Fcopy-event-attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allouis%2Fcopy-event-attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allouis","download_url":"https://codeload.github.com/allouis/copy-event-attributes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713420,"owners_count":20335567,"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-12T21:35:41.075Z","updated_at":"2025-03-15T10:13:23.500Z","avatar_url":"https://github.com/allouis.png","language":"JavaScript","readme":"# copy-event-attributes\n\nThis was pulled out of [yo-yo](https://github.com/maxogden/yo-yo) because I wanted the nicer [morphdom](https://github.com/patrick-steele-idem/morphdom) it provides, but without the dependency on [bel](https://github.com/shama/bel)\n\n### install\n\n###### yarn\n```shell\nyarn add copy-event-attributes\n```\n\n###### npm\n```shell\nnpm install --save copy-event-attributes\n```\n\n### usage\n\n```javascript\nvar copyEvents = require('copy-event-attributes')\n\ncopyEvents(fromEl, toEl)\n```\n\n### usage with morphdom\n\n```javascript\nvar copyEvents = require('copy-event-attributes')\nvar morphdom = require('morphdom')\n\nmorphdom(fromEl, toEl, {\n  onBeforeElUpdated: copyEvents\n})\n```\n\n### usage with custom events\n\n\n```javascript\nvar copyEvents = require('copy-event-attributes')\nvar morphdom = require('morphdom')\n\nfunction copyCustomEvents (fromEl, toEl) {\n  return copyEvents(fromEl, toEl, ['onmyevent'])\n}\n\nmorphdom(fromEl, toEl, {\n onBeforeElUpdated: copyCustomEvents\n})\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallouis%2Fcopy-event-attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallouis%2Fcopy-event-attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallouis%2Fcopy-event-attributes/lists"}