{"id":22061794,"url":"https://github.com/darrylyeo/indomitable","last_synced_at":"2026-05-02T05:40:53.758Z","repository":{"id":116662162,"uuid":"180063408","full_name":"darrylyeo/indomitable","owner":"darrylyeo","description":"Create, reference, and update HTML/DOM objects with ease. Verbose native JavaScript APIs shall never subdue you!","archived":false,"fork":false,"pushed_at":"2019-04-18T17:39:56.000Z","size":109,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T12:12:58.250Z","etag":null,"topics":["dom","dom-api","dom-manipulation","es6-javascript","html","javascript","javascript-framework"],"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/darrylyeo.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":"2019-04-08T03:34:28.000Z","updated_at":"2021-07-13T21:15:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9c1b703-a0be-409b-a295-2bfa156bb72f","html_url":"https://github.com/darrylyeo/indomitable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylyeo%2Findomitable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylyeo%2Findomitable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylyeo%2Findomitable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylyeo%2Findomitable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrylyeo","download_url":"https://codeload.github.com/darrylyeo/indomitable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245139280,"owners_count":20567149,"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","dom-api","dom-manipulation","es6-javascript","html","javascript","javascript-framework"],"created_at":"2024-11-30T18:14:54.469Z","updated_at":"2026-05-02T05:40:48.735Z","avatar_url":"https://github.com/darrylyeo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inDOMitable.js\n\nCreate, reference, and update HTML/DOM objects with ease. Verbose native JavaScript APIs shall never subdue you!\n\n---\n\nThe native JavaScript APIs for interfacing with the HTML Document Object Model (DOM) can be very verbose. Here is the code for generating `\u003cdiv\u003eHello world!\u003c/div\u003e`:\n\n```\nconst div = document.createElement('div')\nconst content = document.createTextNode('Hello world!')\ndiv.appendChild(content)\ndocument.body.appendChild(div)\n```\n\n\ninDOMitable.js aims to make a lot of that simpler, without sacrificing performance. The framework defines a function, `h`, which you can pass \"@\"-annotated HTML. The result is an HTML tree that is ready to use, along with a `.state` object to access and update the annotated text nodes, elements and attributes.\n\n```\nconst view = h`\n\t\u003carticle @article\u003e\n\t\t\u003ch2\u003eProject: @title!\u003c/h2\u003e\n\t\t\u003cimg src:@image\u003e\n\t\t\u003cspan\u003eComments: @comments\u003c/span\u003e\n\t\t\u003ca href:@url target:@\u003eView Project\u003c/a\u003e\n\t\t\u003cpre\u003eThe mouse coordinates are (@x, @y).\u003c/pre\u003e\n\t\u003c/article\u003e\n`\ndocument.body.appendChild(view)\n\nview.state.title = 'My Project'\nview.state.target = '_blank'\nview.state({\n\tcomments: 100,\n\turl: 'https://darryl-yeo.com',\n\timage: 'https://picsum.photos/600/400',\n\tx: 1,\n\ty: 2\n})\n\nconsole.log(view.refs.article)\n// \u003carticle\u003e\n\nconsole.log(view.state.url)\n// https://darryl-yeo.com\n\nconsole.log(view.outerHTML)\n/*\n\u003carticle\u003e\n\t\u003ch2\u003eProject: My Project!\u003c/h2\u003e\n\t\u003cimg src=\"https://picsum.photos/600/400\"\u003e\n\t\u003cspan\u003eComments: 100\u003c/span\u003e\n\t\u003ca href=\"https://darryl-yeo.com\" target=\"_blank\"\u003eView Project\u003c/a\u003e\n\t\u003cpre\u003eThe mouse coordinates are (1, 2).\u003c/pre\u003e\n\u003c/article\u003e\n*/\n\nwindow.onmousemove = ({x, y}) =\u003e\n\tview.state({x, y})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrylyeo%2Findomitable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrylyeo%2Findomitable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrylyeo%2Findomitable/lists"}