{"id":15540199,"url":"https://github.com/miguelcobain/ember-cli-element-closest-polyfill","last_synced_at":"2025-04-14T16:14:36.665Z","repository":{"id":39707303,"uuid":"156477608","full_name":"miguelcobain/ember-cli-element-closest-polyfill","owner":"miguelcobain","description":"Includes a polyfill for closest if needed","archived":false,"fork":false,"pushed_at":"2022-12-30T22:42:05.000Z","size":1486,"stargazers_count":4,"open_issues_count":39,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T16:14:30.960Z","etag":null,"topics":["closest","ember","polyfill"],"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/miguelcobain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-07T02:16:09.000Z","updated_at":"2020-11-05T19:57:38.000Z","dependencies_parsed_at":"2023-01-31T17:00:31.352Z","dependency_job_id":null,"html_url":"https://github.com/miguelcobain/ember-cli-element-closest-polyfill","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/miguelcobain%2Fember-cli-element-closest-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcobain%2Fember-cli-element-closest-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcobain%2Fember-cli-element-closest-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcobain%2Fember-cli-element-closest-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelcobain","download_url":"https://codeload.github.com/miguelcobain/ember-cli-element-closest-polyfill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914114,"owners_count":21182359,"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":["closest","ember","polyfill"],"created_at":"2024-10-02T12:13:12.119Z","updated_at":"2025-04-14T16:14:36.641Z","avatar_url":"https://github.com/miguelcobain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-element-closest-polyfill\n\n[![Build Status](https://travis-ci.org/miguelcobain/ember-cli-element-closest-polyfill.svg?branch=master)](https://travis-ci.org/miguelcobain/ember-cli-element-closest-polyfill)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-element-closest-polyfill.svg)](https://emberobserver.com/addons/ember-cli-element-closest-polyfill)\n[![npm version](https://badge.fury.io/js/ember-cli-element-closest-polyfill.svg)](https://badge.fury.io/js/ember-cli-element-closest-polyfill)\n\nEmber-CLI addon to add a polyfill for the [`Element.closest()`](https://developer.mozilla.org/en/docs/Web/API/Element/closest)\nproperty, based on [element-closest](https://github.com/jonathantneal/closest).\n\nInternet Explorer 11 and lower do not support `closest()`. \nSee full [browser support details](https://caniuse.com/#feat=element-closest).\n\nThe included polyfill also polyfills [`#Element.matches`](https://developer.mozilla.org/en/docs/Web/API/Element/matches), which is\nwidely supported but often vendor-prefixed.\n\n## Installation\n\n```bash\nember install ember-cli-element-closest-polyfill\n```\n\n## Usage\n\nThe addon will import the polyfill by default to your `vendor.js`. \n\nBeginning with version 2.13 Ember CLI supports a [Targets](http://rwjblue.com/2017/04/21/ember-cli-targets/) feature, \nallowing you to specify the list of browsers your app should support like `last 1 Chrome versions` or `ie 11`.\nIf the [caniuse database](https://caniuse.com/#feat=element-closest) indicates that all browsers you want to support *fully* support the feature, then the \npolyfill will *not* be included into your build, to not increase your bundle size.\n\n### Usage in an addon\n\nThis should also work as a nested addon of another addon, just include it as a `dependency`. So if your addon\nmakes use of `closest()`, you can use this to make sure the API is available. Given the above mentioned targets feature,\nit will have no negative impact on the consuming app should the polyfill not be needed.\n\n## Credits\n\nThis addon was inspired by a similar polyfill addon: https://github.com/kaliber5/ember-cli-classlist-polyfill\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcobain%2Fember-cli-element-closest-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelcobain%2Fember-cli-element-closest-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcobain%2Fember-cli-element-closest-polyfill/lists"}