{"id":22090027,"url":"https://github.com/geoloeg/modernizr-element","last_synced_at":"2026-03-11T03:03:15.279Z","repository":{"id":58232889,"uuid":"55414736","full_name":"GeoloeG/modernizr-element","owner":"GeoloeG","description":"[Polymer 1.x] A feature detection element powered by `Modernizr`","archived":false,"fork":false,"pushed_at":"2017-03-08T14:30:56.000Z","size":2690,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T10:14:07.085Z","etag":null,"topics":["feature-detection","modernizr","polymer","polymer-element","webcomponents"],"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/GeoloeG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-04T13:46:51.000Z","updated_at":"2020-02-28T21:40:43.000Z","dependencies_parsed_at":"2022-08-30T22:30:27.091Z","dependency_job_id":null,"html_url":"https://github.com/GeoloeG/modernizr-element","commit_stats":null,"previous_names":["metanov/modernizr-element"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/GeoloeG/modernizr-element","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoloeG%2Fmodernizr-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoloeG%2Fmodernizr-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoloeG%2Fmodernizr-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoloeG%2Fmodernizr-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeoloeG","download_url":"https://codeload.github.com/GeoloeG/modernizr-element/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoloeG%2Fmodernizr-element/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30368601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["feature-detection","modernizr","polymer","polymer-element","webcomponents"],"created_at":"2024-12-01T02:14:57.295Z","updated_at":"2026-03-11T03:03:15.263Z","avatar_url":"https://github.com/GeoloeG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg?style=flat-square)](https://www.webcomponents.org/element/GeoloeG/modernizr-element)\n\n# `\u003cmodernizr-element\u003e` \n\n## Descripton\n\nA feature detection element based on [modernizr](https://modernizr.com/).\n\n## Install\n\nInstall the component using [Bower](http://bower.io/):\n\n```sh\n$ bower install modernizr-element --save\n```\n\n## Generating your `modernizr-custom.js` file\n\nIn order for the element to provide its feature detection functionality, a javascript file named `modernizr-custom.js` need to be generated.\nThis file will include all the tests available for feature detection by the `modernizr-element`.\nOnce the file has been produced, you will need to copy the file in the same folder as the `modernizr-element.html`. (e.g. `path/to/bower_components/modernizr/`)\n\nThere are several ways to produce the `modernizr-custom.js` file:\n\n1. Using the [Modernizr website](https://modernizr.com/download?setclasses) download feature.\n2. Using `modernizr` in your gulp file:\n```javascript\ngulp.task('modernizr', function(cb) {\n  var detects = [\n    'adownload',\n    'blobconstructor',\n    'flash'\n  ].join();\n\n  var output = 'frontend/js/modernizr.custom.js';\n\n  return exec('./node_modules/.bin/modernizr -f ' + detects + ' -d ' + output,\n    cb\n  );\n});\n```\n3. Using the [`gulp-modernizr`](https://github.com/doctyper/gulp-modernizr)\n\nNote: the element contains by default a full build which should NOT be used in production.\n\n## Usage\n\nImport Custom Element:\n\n\u003c!---\n```\n\u003ccustom-element-demo\u003e\n  \u003ctemplate\u003e\n    \u003clink rel=\"import\" href=\"dom-repeat-n.html\"\u003e\n\t  \u003cnext-code-block\u003e\u003c/next-code-block\u003e\n  \u003c/template\u003e\n\u003c/custom-element-demo\u003e\n```\n--\u003e\n```html\n\u003clink rel=\"import\" href=\"bower_components/modernizr-element/modernizr-element.html\"\u003e\n```\n\nAnd then use it:\n\n```html\n\u003cmodernizr-element geolocation=\"{{_geolocation}}\"\u003e\u003c/modernizr-element\u003e\n\u003cp\u003eFeature geolocation is : {{_geolocation}}\u003c/p\u003e\n```\n\nSee the [Documentation](https://geoloeg.github.io/modernizr-element/) for more options.\n\n## More Demos\n\n[https://geoloeg.github.io/modernizr-element/](https://geoloeg.github.io/modernizr-element/components/modernizr-element/demo/)\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -m 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoloeg%2Fmodernizr-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoloeg%2Fmodernizr-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoloeg%2Fmodernizr-element/lists"}