{"id":21594453,"url":"https://github.com/meduzen/canistop-web-component","last_synced_at":"2026-04-29T06:37:02.263Z","repository":{"id":88671533,"uuid":"562492982","full_name":"meduzen/canistop-web-component","owner":"meduzen","description":"Currently a very WIP playground","archived":false,"fork":false,"pushed_at":"2022-11-12T22:54:56.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T11:04:36.754Z","etag":null,"topics":["web-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meduzen.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":"2022-11-06T14:32:49.000Z","updated_at":"2025-02-24T08:34:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f45bb7a8-1e04-4282-8a1c-15281828bbef","html_url":"https://github.com/meduzen/canistop-web-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meduzen/canistop-web-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meduzen%2Fcanistop-web-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meduzen%2Fcanistop-web-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meduzen%2Fcanistop-web-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meduzen%2Fcanistop-web-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meduzen","download_url":"https://codeload.github.com/meduzen/canistop-web-component/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meduzen%2Fcanistop-web-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262950294,"owners_count":23389638,"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":["web-components"],"created_at":"2024-11-24T17:18:25.593Z","updated_at":"2026-04-29T06:36:57.231Z","avatar_url":"https://github.com/meduzen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# I’m learning Web Components\n\nThis is a playground.\n\nI’m using one of my projects ([canistop.net](https://canistop.net/)) as real-worls situation to apply some learning.\n\n**I’m just starting, so this repo is obviously a mess.**\n\n## Ideas\n\nToy around Web Components and see what could be a good custom element for _Can I Stop_.\n\nFor example:\n- being able to navigate between older and newer versions of a browser easily (this feature doesn’t exist on the main website, yet), with left/right (previous/next) arrows button;\n- use CSS container queries to provide multiple “layouts” out of the box;\n- show a nice small icon of the shown browser, and more modern styles in general;\n- have a clear open styles API that make sense (this is a good exercise);\n- ship it as a package, and also allow to be used by directly importing the module from `canistop.net`, maybe like:\n    - `\u003cscript type=\"module\" src=\"https://canistop.net/….js\"\u003e`\n    - `import canistopComponent from 'https://canistop.net/….js'`\n- consider how to test WCs (preferably using Playwright if it’s a possible good idea).\n\nAs the main project would hugely benefit from a revamp of the data handling to be able to provide queries for browser versions **ranges** (and not only single browser version), the web component will remain limited in utility. (I have no time for that revamp these days.)\n\n## Current usage\n\nSee `index.html`.\n\n```html\n\u003ccanistop-something\n    browser=\"ie-11\"\n    regions=\"alt-ww,be,fr,jp\"\n    network-cache=\"false\"\n    refresh-label=\"fetch again\"\n\u003e\n    some slot that is not very interesting\n\u003c/canistop-something\u003e\n```\n\n(Yes, the component name is temporary.)\n\n- `browser`: browser name and version, as shown in canistop.net URL bar;\n- `regions` (default: all regions): coma-separated regions codes, as shown in canistop.net;\n- `network-cache` (default: `true`): when true, always bypass browser network cache (using [`cache: 'reload'`](https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value));\n- `refresh-label` (default: “fetch again”): the label of the “refresh” button.\n\n## Resources\n\n- [Web Components \u0026 Stencil.js - Build Custom HTML Elements](https://www.udemy.com/course/web-components-stenciljs-build-custom-html-elements/): a course by Maximilian Schwarzmüller\n- A shitton of tabs I have open:\n - https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots\n - https://web.dev/declarative-shadow-dom/\n - https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n - https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted\n - https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#libraries\n - https://developer.mozilla.org/en-US/docs/Web/Web_Components\n - https://web.dev/custom-elements-v1/\n - https://web.dev/shadowdom-v1/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeduzen%2Fcanistop-web-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeduzen%2Fcanistop-web-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeduzen%2Fcanistop-web-component/lists"}