{"id":15677491,"url":"https://github.com/hph/web-socket","last_synced_at":"2025-10-25T12:08:16.551Z","repository":{"id":58235897,"uuid":"47649121","full_name":"hph/web-socket","owner":"hph","description":"A Polymer element to ease the use and configuration of WebSockets","archived":false,"fork":false,"pushed_at":"2017-03-15T15:52:29.000Z","size":2201,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-24T08:20:46.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"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/hph.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":"2015-12-08T20:57:28.000Z","updated_at":"2023-03-10T10:08:27.000Z","dependencies_parsed_at":"2022-08-31T09:22:59.197Z","dependency_job_id":null,"html_url":"https://github.com/hph/web-socket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hph/web-socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hph%2Fweb-socket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hph%2Fweb-socket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hph%2Fweb-socket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hph%2Fweb-socket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hph","download_url":"https://codeload.github.com/hph/web-socket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hph%2Fweb-socket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280771222,"owners_count":26388026,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"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":[],"created_at":"2024-10-03T16:09:43.240Z","updated_at":"2025-10-25T12:08:16.533Z","avatar_url":"https://github.com/hph.png","language":"HTML","readme":"# web-socket [![Build Status](https://travis-ci.org/hph/web-socket.svg?branch=master)](https://travis-ci.org/hph/web-socket)\n\nA [Polymer](https://www.polymer-project.org/1.0/) element to ease the use and\nconfiguration of\n[WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket).\n\n```html\n\u003cweb-socket url=\"ws://echo.websocket.org\"\n            auto json\n            on-open=\"_onOpen\"\n            on-close=\"_onClose\"\n            on-message=\"_onMessage\"\n            on-error=\"_onError\"\u003e\n\u003c/web-socket\u003e\n```\n\nThe above example shows how to establish a WebSocket connection with\n`\u003cweb-socket\u003e` in a [Polymer](https://www.polymer-project.org) app. This simple\ndeclarative element definition is:\n\n- Establishing a connection to `ws://echo.websocket.org`.\n- Automatically connecting on page load.\n- Parsing and stringifying JSON automatically.\n- Automatically reconnecting in the event of an unclean close event (a default\n  behaviour of this library - no configuration required through properties).\n- Setting up event handlers to functions declared externally (`_onOpen`,\n  `_onClose`, etc - defined by a parent element, such as a page).\n\n### Install\n\nYou can install `\u003cweb-socket\u003e` with Bower\n\n    bower install web-socket\n\nYou can also view the [documentation](http://hph.github.io/web-socket), try the\n[demo](http://hph.github.io/web-socket/demo) and run the\n[tests](http://hph.github.io/web-socket/test).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhph%2Fweb-socket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhph%2Fweb-socket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhph%2Fweb-socket/lists"}