{"id":18222536,"url":"https://github.com/nerzal/tinydom","last_synced_at":"2025-04-03T03:30:41.133Z","repository":{"id":45493517,"uuid":"344579076","full_name":"Nerzal/tinydom","owner":"Nerzal","description":"TinyGo compatible DOM manipulation library. For use in WASM","archived":false,"fork":false,"pushed_at":"2022-08-04T13:03:21.000Z","size":1067,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T06:36:00.610Z","etag":null,"topics":["dom","go","tinygo","wasm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nerzal.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","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":"2021-03-04T18:59:49.000Z","updated_at":"2025-03-14T12:03:25.000Z","dependencies_parsed_at":"2022-07-19T01:33:01.197Z","dependency_job_id":null,"html_url":"https://github.com/Nerzal/tinydom","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nerzal%2Ftinydom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nerzal%2Ftinydom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nerzal%2Ftinydom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nerzal%2Ftinydom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nerzal","download_url":"https://codeload.github.com/Nerzal/tinydom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933253,"owners_count":20857046,"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":["dom","go","tinygo","wasm"],"created_at":"2024-11-03T23:04:48.121Z","updated_at":"2025-04-03T03:30:40.221Z","avatar_url":"https://github.com/Nerzal.png","language":"Go","readme":"# TinyDom\n\nTinyGo compatible DOM manipulation library. For use in WASM\n\nThis library is heavily based on [godom](https://github.com/siongui/godom). It was changed to be usable in [TinyGo](https://tinygo.org) projects.\n\nTinyDom wraps nearly every function of `syscall/js`.\n\nAlso TimyDom provides some wrapper around html elements, like the following:\n\n* form\n* input\n* label\n* output\n* fieldset\n* video\n\n## Example Usage\n\n```go\npackage main\n\nimport (\npackage main\n\nimport (\n \"github.com/Nerzal/tinydom\"\n \"github.com/Nerzal/tinydom/elements/form\"\n \"github.com/Nerzal/tinydom/elements/input\"\n)\n\nfunc main() {\n document := tinydom.GetDocument()\n\n body := document.GetElementById(\"body-component\")\n\n h1 := document.CreateElement(\"h1\")\n h1.SetInnerHTML(\"Welcome to tinydom - Hello TinyWorld \u003c3\")\n body.AppendChild(h1)\n\n h2 := document.CreateElement(\"h1\")\n h2.SetInnerHTML(\"Yes! I do compile with TinyGo!\")\n body.AppendChild(h2)\n\n br := document.CreateElement(\"br\")\n body.AppendChild(br)\n\n body.AppendChild(br)\n\n myForm := form.New()\n label := document.CreateElement(\"label\")\n label.SetInnerHTML(\"Name:\")\n textInput := input.NewTextInput()\n\n passwordLabel := document.CreateElement(\"label\")\n passwordLabel.SetInnerHTML(\"Password:\")\n passwordInput := input.New(input.PasswordInput)\n\n submitInput := input.New(input.SubmitInput)\n\n err := myForm.Append(label, textInput.Element, passwordLabel, passwordInput.Element, submitInput.Element)\n if err != nil {\n  println(err.Error())\n }\n\n body.AppendChild(myForm.Element)\n\n wait := make(chan struct{}, 0)\n \u003c-wait\n}\n\n}\n```\n\n## Run the example\n\nSimply use the makefile :)\n\n\u003e make example-app\n\nNote: The example uses a wasm_exec.js from tinygo 1.17 :)\n\n## Example Result\n\n![grafik](https://user-images.githubusercontent.com/9110370/110029225-7931a480-7d34-11eb-9202-d3af100bdf98.png)\n\nExample Video is Big Buck Bunny from [blender](https://peach.blender.org/about/)\n\nExample Video License: https://creativecommons.org/licenses/by/3.0/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerzal%2Ftinydom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerzal%2Ftinydom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerzal%2Ftinydom/lists"}