{"id":18753986,"url":"https://github.com/vilherda/connectionstatus-webcomponent","last_synced_at":"2026-05-20T07:36:15.633Z","repository":{"id":57205849,"uuid":"301232425","full_name":"vilherda/connectionstatus-webcomponent","owner":"vilherda","description":"Web component which helps to detect if the browser has connectivity or not","archived":false,"fork":false,"pushed_at":"2020-10-23T14:52:20.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-20T12:53:48.475Z","etag":null,"topics":["component","connection","status","web","webcomponent"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vilherda.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}},"created_at":"2020-10-04T21:37:07.000Z","updated_at":"2020-10-23T14:51:20.000Z","dependencies_parsed_at":"2022-09-18T01:22:26.550Z","dependency_job_id":null,"html_url":"https://github.com/vilherda/connectionstatus-webcomponent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vilherda/connectionstatus-webcomponent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilherda%2Fconnectionstatus-webcomponent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilherda%2Fconnectionstatus-webcomponent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilherda%2Fconnectionstatus-webcomponent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilherda%2Fconnectionstatus-webcomponent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vilherda","download_url":"https://codeload.github.com/vilherda/connectionstatus-webcomponent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilherda%2Fconnectionstatus-webcomponent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265663004,"owners_count":23807463,"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":["component","connection","status","web","webcomponent"],"created_at":"2024-11-07T17:27:43.294Z","updated_at":"2026-05-20T07:36:10.607Z","avatar_url":"https://github.com/vilherda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connection Status Web Component\n\n## Description\n\nWeb component wich helps to detect if the browser has connectivity or not\n\n## HOWTO use\n\n### Example with plain HTML\n\nSee 'demo.html'.\n\n### Example with Vue 2\n\nOn `main.js`:\n\n```javascript\n...\nimport { ConnectionStatus } from 'connectionstatus-webcomponent';\n...\nVue.component('connection-status', ConnectionStatus);\n...\nnew Vue({\n  render: h =\u003e h(App),\n}).$mount('#app');\n```\n\nOn `somecomponent.vue`:\n\nInside `\u003ctemplate\u003e` section:\n\n```html\n...\n\u003cconnection-status @connection-status-changed=\"connectionStatusHandler\"\u003e\n\u003c/connection-status\u003e\n...\n\u003ch2\u003eConnection status : {{ onlineStatus }}\u003c/h2\u003e\n...\n```\n\nInside `\u003cscript\u003e` section:\n\n```javascript\n...\ndata() {\n  return {\n    ...\n    onlineStatus: false,\n    ...\n  };\n},\n...\nmethods: {\n  ...\n  connectionStatusHandler(event) {\n    this.onlineStatus = event.detail;\n  },\n  ...\n}\n...\n```\n\n### Example with Vue 3\n\nOn `main.js`:\n\n```javascript\n...\nimport { ConnectionStatus } from 'connectionstatus-webcomponent';\n...\nconst app = createApp(App);\n...\napp.component('connection-status', ConnectionStatus);\n...\napp.use(...).use(...).mount('#app');\n```\n\nOn `somecomponent.vue`:\n\nInside `\u003ctemplate\u003e` section:\n\n```html\n...\n\u003cconnection-status @connection-status-changed=\"connectionStatusHandler\"\u003e\n\u003c/connection-status\u003e\n...\n\u003ch2\u003eConnection status : {{ onlineStatus }}\u003c/h2\u003e\n...\n```\n\nInside `\u003cscript\u003e` section:\n\n```javascript\n...\ndata() {\n  return {\n    ...\n    onlineStatus: false,\n    ...\n  };\n},\n...\nmethods: {\n  ...\n  connectionStatusHandler(event) {\n    this.onlineStatus = event.detail;\n  },\n  ...\n}\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilherda%2Fconnectionstatus-webcomponent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvilherda%2Fconnectionstatus-webcomponent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilherda%2Fconnectionstatus-webcomponent/lists"}