{"id":20452850,"url":"https://github.com/axtk/proxy-element","last_synced_at":"2025-08-22T02:07:04.090Z","repository":{"id":110829666,"uuid":"321212148","full_name":"axtk/proxy-element","owner":"axtk","description":"A concise syntax for event delegation","archived":false,"fork":false,"pushed_at":"2020-12-19T01:06:27.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T09:45:52.956Z","etag":null,"topics":["event-delegation","vanilla-js"],"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/axtk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-14T02:37:02.000Z","updated_at":"2020-12-19T01:06:29.000Z","dependencies_parsed_at":"2023-06-01T00:45:50.825Z","dependency_job_id":null,"html_url":"https://github.com/axtk/proxy-element","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtk%2Fproxy-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtk%2Fproxy-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtk%2Fproxy-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtk%2Fproxy-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axtk","download_url":"https://codeload.github.com/axtk/proxy-element/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242005724,"owners_count":20056431,"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":["event-delegation","vanilla-js"],"created_at":"2024-11-15T11:10:35.564Z","updated_at":"2025-03-05T09:47:14.300Z","avatar_url":"https://github.com/axtk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```js\nimport {proxySelector, proxySelectorAll} from 'proxy-element';\n\nlet container = document.querySelector('#container');\n\n// delegating events from any existing and future elements\n// within the container to the container itself:\nproxySelector('h2', container).addEventListener('click', event =\u003e {\n    console.log(event.target);\n});\nproxySelectorAll('.list-item', container).addEventListener('click', event =\u003e {\n    console.log(event.target);\n});\n```\n\n```js\n// unspecified second argument: host element === document\nlet button = proxySelector('.header button');\nlet onButtonClick = () =\u003e console.log(button.query().textContent);\n\nbutton.addEventListener('click', onButtonClick);\nbutton.removeEventListener('click', onButtonClick);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxtk%2Fproxy-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxtk%2Fproxy-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxtk%2Fproxy-element/lists"}