{"id":18396728,"url":"https://github.com/igorskyflyer/npm-scrollend-polyfill","last_synced_at":"2025-04-07T04:32:45.321Z","repository":{"id":247597266,"uuid":"730064322","full_name":"igorskyflyer/npm-scrollend-polyfill","owner":"igorskyflyer","description":"🛴 A performant and light (\u003c 1.5KB) JavaScript polyfill for the scrollend Event. ⛸️","archived":false,"fork":false,"pushed_at":"2024-07-21T21:43:18.000Z","size":70,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T19:48:26.022Z","etag":null,"topics":["back-end","biome","browser","dom","element","es6","event","html","igorskyflyer","javascript","js","npm","scroll-end","scrollend","scrollend-polyfill","ts","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@igor.dvlpr/scrollend-polyfill","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/igorskyflyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"ko_fi":"igorskyflyer"}},"created_at":"2023-12-11T06:00:18.000Z","updated_at":"2025-01-24T01:42:02.000Z","dependencies_parsed_at":"2024-07-21T19:45:03.103Z","dependency_job_id":"802dbfc6-5adf-4200-b453-d2c6d29d83b9","html_url":"https://github.com/igorskyflyer/npm-scrollend-polyfill","commit_stats":null,"previous_names":["igorskyflyer/npm-scrollend-polyfill"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-scrollend-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-scrollend-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-scrollend-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-scrollend-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorskyflyer","download_url":"https://codeload.github.com/igorskyflyer/npm-scrollend-polyfill/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595082,"owners_count":20963939,"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":["back-end","biome","browser","dom","element","es6","event","html","igorskyflyer","javascript","js","npm","scroll-end","scrollend","scrollend-polyfill","ts","typescript"],"created_at":"2024-11-06T02:14:41.051Z","updated_at":"2025-04-07T04:32:44.998Z","avatar_url":"https://github.com/igorskyflyer.png","language":"TypeScript","funding_links":["https://ko-fi.com/igorskyflyer"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eScrollEnd polyfill\u003c/h1\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  🛴 A performant and light (\u0026lt; 1.5KB) JavaScript polyfill for the scrollend Event. ⛸️\n\u003c/p\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cblockquote\u003e\n    \u003cbr\u003e\n    \u003ch4\u003e💖 Support further development\u003c/h4\u003e\n    \u003cspan\u003eI work hard for every project, including this one and your support means a lot to me!\n    \u003cbr\u003e\n    Consider buying me a coffee. ☕\n    \u003cbr\u003e\n    \u003cstrong\u003eThank you for supporting my efforts! 🙏😊\u003c/strong\u003e\u003c/span\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://ko-fi.com/igorskyflyer\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/igorskyflyer/main/assets/ko-fi.png\" alt=\"Donate to igorskyflyer\" width=\"150\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/igorskyflyer\"\u003e\u003cem\u003e@igorskyflyer\u003c/em\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n  \u003c/blockquote\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 📃 Table of contents\n\n- [Usage](#-usage)\n- [API](#-api)\n    - [CDN](#cdn)\n    - [Install](#package-install)\n- [Examples](#-examples)\n- [Changelog](#-changelog)\n- [License](#-license)\n- [Related](#-related)\n- [Author](#-author)\n\n---\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🕵🏼 Usage\n\nYou can import the file via the CDN or by installing the package.\n\n\u003cbr\u003e\n\n### CDN\n\n\u003cbr\u003e\n\n\u003cimg src=\"https://data.jsdelivr.com/v1/package/gh/igorskyflyer/npm-scrollend-polyfill/badge\" alt=\"jsDelivr stats\"\u003e\n\n\u003cbr\u003e\n\nThe polyfill is hosted on jsDelivr and you can grab it from here:\n\n[https://cdn.jsdelivr.net/gh/igorskyflyer/npm-scrollend-polyfill@1.2.1/dist/scrollend.min.js](https://cdn.jsdelivr.net/gh/igorskyflyer/npm-scrollend-polyfill@1.2.1/dist/scrollend.min.js)\n\n\nthen add it to your HTML file:\n\n\u003cbr\u003e\n\n`index.html`\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/igorskyflyer/npm-scrollend-polyfill@1.2.1/dist/scrollend.min.js\"\n        integrity=\"sha256-3fG8VnL6PFA7RyDVnkG5bk03GMi6Xvy1tIKkSMKJ+Ds=\"\n        crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n```\n\n---\n\n### Package install\n\nInstall it by executing:\n\n```shell\nnpm i \"@igor.dvlpr/scrollend-polyfill\"\n```\n\nThen import it into your project, e.g. an HTML page via the `\u003cscript\u003e` tag:\n\n\u003cbr\u003e\n\n`index.html`\n```html\n\u003cscript src=\"./node_modules/@igor.dvlpr/scrollend-polyfill/dist/scrollend.min.js\"\n        integrity=\"sha256-3fG8VnL6PFA7RyDVnkG5bk03GMi6Xvy1tIKkSMKJ+Ds=\"\u003e\u003c/script\u003e\n```\n\nbut if you don't like messing with that long path just copy the `\"./node_modules/@igor.dvlpr/scrollend-polyfill/dist/scrollend.min.js\"` file to a directory of your liking and then update the reference to it, i.e.\n\n```html\n\u003cscript src=\"./js/scrollend.min.js\"\n        integrity=\"sha256-3fG8VnL6PFA7RyDVnkG5bk03GMi6Xvy1tIKkSMKJ+Ds=\"\u003e\u003c/script\u003e\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003e [!NOTE]\n\u003e If you use CSP (*which you really should)* you need to add the above SHA-256 hash to the allowed script sources.\n\u003e\n\n\u003cbr\u003e\n\n## 🤹🏼 API\n\nThis polyfill adds the `scrollend` Event for the `window` and `document` objects.\n\n```js\nwindow.addEventListener('scrollend', myHandler)\ndocument.addEventListener('scrollend', myHandler)\n```\n\n\u003cbr\u003e\n\nThe polyfilled `scrollend` Event can be added via `addEventListener()` or via the property `onscrollend`.\n\n```js\nwindow.onscrollend = myHandler\ndocument.onscrollend = myHandler\n```\n\n---\n\n## ✨ Examples\n\n`scroll-end.html`\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eScrollend polyfill\u003c/title\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/gh/igorskyflyer/npm-scrollend-polyfill@1.2.1/dist/scrollend.min.js\"\n            integrity=\"sha256-3fG8VnL6PFA7RyDVnkG5bk03GMi6Xvy1tIKkSMKJ+Ds=\"\n            crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n    \u003cstyle\u003e\n      body {\n        height: 180vh;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cmain\u003e\n      \u003cdiv\u003e\n        \u003ch1\u003eLaunch the DevTools and open the Console tab.\u003c/h1\u003e\n        \u003ch3\u003eThen start scrolling.\u003c/h3\u003e\n      \u003c/div\u003e\n    \u003c/main\u003e\n    \u003cscript\u003e\n      function test() {\n        console.log('Scroll ended')\n      }\n\n      document.addEventListener('scrollend', test)\n    \u003c/script\u003e\n  \u003c/body\u003e\n\n\u003c/html\u003e\n\n```\n\n---\n\n## 📝 Changelog\n\n✨ Changelog is available here: [CHANGELOG.md](https://github.com/igorskyflyer/npm-scrollend-polyfill/blob/main/CHANGELOG.md).\n\n---\n\n## 🪪 License\n\nLicensed under the MIT license which is available here, [MIT license](https://github.com/igorskyflyer/npm-scrollend-polyfill/blob/main/LICENSE).\n\n---\n\n## 🧬 Related\n\n[@igor.dvlpr/magic-queryselector](https://www.npmjs.com/package/@igor.dvlpr/magic-queryselector)\n\n\u003e _🪄 A TypeScript-types patch for querySelector/querySelectorAll, make them return types you expect them to! 🔮_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/aria](https://www.npmjs.com/package/@igor.dvlpr/aria)\n\n\u003e _🧬 Meet Aria, an efficient Adblock filter list compiler, with many features that make your maintenance of Adblock filter lists a breeze! 🦖_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/windows-packages](https://www.npmjs.com/package/@igor.dvlpr/windows-packages)\n\n\u003e _💻 A Node.js module for reading the Packages registry key on Windows 10+. Useful for retrieving Windows 10+ installed Store applications. 📦_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/encode-entities](https://www.npmjs.com/package/@igor.dvlpr/encode-entities)\n\n\u003e _🏃‍♂️ Fast and simple Map and RegExp based HTML entities encoder. 🍁_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/regkeys](https://www.npmjs.com/package/@igor.dvlpr/regkeys)\n\n\u003e _📚 An NPM package for fetching Windows registry keys. 🗝_\n\n---\n\n\u003cbr\u003e\n\n### 👨🏻‍💻 Author\nCreated by **Igor Dimitrijević** ([*@igorskyflyer*](https://github.com/igorskyflyer/)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-scrollend-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorskyflyer%2Fnpm-scrollend-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-scrollend-polyfill/lists"}