{"id":16114759,"url":"https://github.com/solarliner/promisify-html","last_synced_at":"2025-04-06T08:17:29.117Z","repository":{"id":80989299,"uuid":"144589697","full_name":"SolarLiner/promisify-html","owner":"SolarLiner","description":"Use promises for one-time bindings to Window/Document/Element events.","archived":false,"fork":false,"pushed_at":"2018-08-13T15:58:15.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-02-12T13:54:13.035Z","etag":null,"topics":["document","dom","element","event","js","promise","window"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/SolarLiner.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-13T14:17:27.000Z","updated_at":"2018-08-13T15:58:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"859d0ff9-2c55-486c-90a2-ed809fea3477","html_url":"https://github.com/SolarLiner/promisify-html","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpromisify-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpromisify-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpromisify-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLiner%2Fpromisify-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolarLiner","download_url":"https://codeload.github.com/SolarLiner/promisify-html/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451658,"owners_count":20940944,"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":["document","dom","element","event","js","promise","window"],"created_at":"2024-10-09T20:15:41.039Z","updated_at":"2025-04-06T08:17:29.099Z","avatar_url":"https://github.com/SolarLiner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# promisify-html\n\nOne-time binding to HTML events through promises.\n\n## Install\n\n```bash\nnpm install promisify-html\n# OR\nyarn add promisify-html\n```\n\n## Use\n\nTo bind to a window, document or element event:\n\n```javascript\n// Bind to the window click event, printing the event object to the console\nwindow.on(\"click\").then((ev) =\u003e console.log(ev));\n// Bind to document load event, printing the event object to the console\ndocument.on(\"load\").then((ev) =\u003e console.log(ev));\n// Bind to an form's submit event, printing the event object to the console\nconst form = document.createElement(\"form\");\nform.on(\"submit\").then((ev) =\u003e console.log(ev));\n```\n\nCode uses the global `Promise` object, therefore you can use your favorite Promise library, as long as it implements the ES6 Promise constructor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarliner%2Fpromisify-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolarliner%2Fpromisify-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarliner%2Fpromisify-html/lists"}