{"id":19315991,"url":"https://github.com/socketry/live-js","last_synced_at":"2025-04-22T16:32:49.685Z","repository":{"id":48926594,"uuid":"357129906","full_name":"socketry/live-js","owner":"socketry","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-06T12:28:37.000Z","size":101,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T17:16:49.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socketry.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-04-12T09:16:02.000Z","updated_at":"2024-09-28T15:59:11.000Z","dependencies_parsed_at":"2024-05-04T00:32:57.889Z","dependency_job_id":"1f290997-db12-4f6e-b291-270c66f78815","html_url":"https://github.com/socketry/live-js","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"4a0fdac8d6c78b14879504b10f357b1d0656fd1b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Flive-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Flive-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Flive-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Flive-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketry","download_url":"https://codeload.github.com/socketry/live-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250277393,"owners_count":21404041,"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":[],"created_at":"2024-11-10T01:09:18.992Z","updated_at":"2025-04-22T16:32:49.404Z","avatar_url":"https://github.com/socketry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Live (JavaScript)\n\nThis is the JavaScript library for implementing the Ruby gem of the same name.\n\n## Document Manipulation\n\n### `live.update(id, html, options)`\n\nUpdates the content of the element with the given `id` with the given `html`. The `options` parameter is optional and can be used to pass additional options to the update method.\n\n- `options.reply` - If truthy, the server will reply with `{reply: options.reply}`.\n\n### `live.replace(selector, html, options)`\n\nReplaces the element(s) selected by the given `selector` with the given `html`. The `options` parameter is optional and can be used to pass additional options to the replace method.\n\n- `options.reply` - If truthy, the server will reply with `{reply: options.reply}`.\n\n### `live.prepend(selector, html, options)`\n\nPrepends the given `html` to the element(s) selected by the given `selector`. The `options` parameter is optional and can be used to pass additional options to the prepend method.\n\n- `options.reply` - If truthy, the server will reply with `{reply: options.reply}`.\n\n### `live.append(selector, html, options)`\n\nAppends the given `html` to the element(s) selected by the given `selector`. The `options` parameter is optional and can be used to pass additional options to the append method.\n\n- `options.reply` - If truthy, the server will reply with `{reply: options.reply}`.\n\n### `live.remove(selector, options)`\n\nRemoves the element(s) selected by the given `selector`. The `options` parameter is optional and can be used to pass additional options to the remove method.\n\n- `options.reply` - If truthy, the server will reply with `{reply: options.reply}`.\n\n### `live.dispatchEvent(selector, type, options)`\n\nDispatches an event of the given `type` on the element(s) selected by the given `selector`. The `options` parameter is optional and can be used to pass additional options to the dispatchEvent method.\n\n- `options.detail` - The detail object to pass to the event.\n- `options.bubbles` - A boolean indicating whether the event should bubble up through the DOM.\n- `options.cancelable` - A boolean indicating whether the event can be canceled.\n- `options.composed` - A boolean indicating whether the event will trigger listeners outside of a shadow root.\n\n## Event Handling\n\n### `live.forward(id, event)`\n\nConnect and forward an event on the element with the given `id`. If the connection can't be established, the event will be buffered.\n\n### `live.forwardEvent(id, event, details)`\n\nForward a HTML DOM event to the server. The `details` parameter is optional and can be used to pass additional details to the server.\n\n### `live.forwardFormEvent(id, event, details)`\n\nForward an event which has form data to the server. The `details` parameter is optional and can be used to pass additional details to the server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Flive-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketry%2Flive-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Flive-js/lists"}