{"id":43702217,"url":"https://github.com/convergencelabs/dom-utils","last_synced_at":"2026-02-05T05:09:24.132Z","repository":{"id":18987955,"uuid":"83945024","full_name":"convergencelabs/dom-utils","owner":"convergencelabs","description":"Utilities to bind a Convergence Model to the DOM.","archived":false,"fork":false,"pushed_at":"2022-11-11T11:56:31.000Z","size":105,"stargazers_count":4,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-20T13:51:19.758Z","etag":null,"topics":["convergence","dom","realtime"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/convergencelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-05T04:36:26.000Z","updated_at":"2021-08-12T23:08:45.000Z","dependencies_parsed_at":"2023-01-13T20:06:59.741Z","dependency_job_id":null,"html_url":"https://github.com/convergencelabs/dom-utils","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/convergencelabs/dom-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convergencelabs%2Fdom-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convergencelabs%2Fdom-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convergencelabs%2Fdom-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convergencelabs%2Fdom-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/convergencelabs","download_url":"https://codeload.github.com/convergencelabs/dom-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convergencelabs%2Fdom-utils/sbom","scorecard":{"id":303712,"data":{"date":"2025-08-11","repo":{"name":"github.com/convergencelabs/dom-utils","commit":"4fbbb138f2960c2692d6b327741448e27081a949"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/convergencelabs/dom-utils/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/convergencelabs/dom-utils/main.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g954-5hwp-pp24","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:26:43.126Z","repository_id":18987955,"created_at":"2025-08-17T21:26:43.126Z","updated_at":"2025-08-17T21:26:43.126Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["convergence","dom","realtime"],"created_at":"2026-02-05T05:09:23.606Z","updated_at":"2026-02-05T05:09:24.124Z","avatar_url":"https://github.com/convergencelabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"left\"\u003e\n  \u003cimg  alt=\"Convergence Logo\" height=\"80\" src=\"https://convergence.io/assets/img/convergence-logo.png\" \u003e\n\u003c/div\u003e\n\n# Convergence DOM Utils\n![Build Status](https://github.com/convergencelabs/dom-utils/actions/workflows/main.yml/badge.svg)\n\nThis project contains utilities to that make binding the DOM to a Convergence Model.\n\n\n# Dependencies\nThis library depends on the following libraries:\n\n* **@convergence/convergence**: The main Convergence client API.\n\n\n# Building the Distribution\n\n```shell\nnpm install\nnpm run dist\n```\n\n# Usage \n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003cstyle\u003e\n    .edit { border: 1px solid black; height: 400px; width: 400px; margin-top: 15px; }\n  \u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch3\u003eContent Editable Rich Text Area\u003c/h3\u003e\n\u003cdiv class=\"edit\" id=\"editable\"\u003eLoading...\u003c/div\u003e\n\u003cscript\u003e\n  const editable = document.getElementById(\"editable\"); \n  const DOMAIN_URL = \"http://localhost:8000/api/realtime/convergence/default\";\n  Convergence.connectAnonymously(DOMAIN_URL).then(function (domain) {\n    return domain.models().open(\"content-editable\", \"test\", function () {\n      return ConvergenceDomUtils.DomConverter.htmlToJson(\n        \"Here is some initial text with a \u003cb\u003ebold\u003c/b\u003e section and some \u003ci\u003eitalics\u003c/i\u003e.\"\n      );\n    });\n  }).then(function (model) {\n    const binder = new ConvergenceDomUtils.DomBinder(editable, model);\n    editable.contentEditable = true;\n  });\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n# API\n\n## ConvergenceDomUtils.DomBinder\n**`constructor(element: HTMLElement, data: RealTimeObject | RealTimeModel, autoBind: boolean = true)`**\n\nCreates a new DomBinder associated with a specific HTMLElement and RealTimeObject. If an instance of RealTimeModel is passed in, the HTMLElemenet will be bound to the root element of the model. The current contents of the element will be replaced by the DOM representation contained in the RealTimeObject. The autoBind parameter configures whether or not the DomBinder will automatically bind upon construction. The default is true.\n\n**`unbind(): void`**\n\nDisconnects the HTMLElement from the RealTimeObject. The element and model will be left as is, but the two-way data binding will be disconnected. This method can only be called when the DomBinder is bound.\n\n**`bind(): void`**\n\nSets up the two-way data binding between the element and RealTimeObject. This method can only be called when the DomBinder is not already bound.\n\n**`isBound(): boolean`**\n\nDetermines if the HTMLElement and RealTimeObject are currently bound.\n\n## ConvergenceDomUtils.DomConverter\n**`static htmlToJson(html: string): any`**\n\nConverts a string containing HTML into the JSON representation of the DOM Tree.\n\n**`static nodeToJson(node: Node): any`**\n\nConverts a DOM Node (e.g. Element, Text) into the JSON representation of the DOM Tree.\n\n**`static jsonToNode(json: any): Node`**\n\nConverts the JSON Representation of a DOM Tree into a DOM Node.\n    \n\n# Running the Example\nTo run the example you must first:\n\n1. Build the distribution\n2. Follow the steps in the example/config.example.js file\n3. Open the example/index.html file in your browser\n\n\nNote: to run the example you must have a running Convergence Server.  The easiest way to get one running is using Docker:\n\n```shell\ndocker run \\\n  --name convergence \\\n  -p 8000:80 \\\n  convergencelabs/convergence-omnibus\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvergencelabs%2Fdom-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconvergencelabs%2Fdom-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvergencelabs%2Fdom-utils/lists"}