{"id":19952222,"url":"https://github.com/timluq/fallback-dom","last_synced_at":"2026-04-17T03:01:49.276Z","repository":{"id":94638491,"uuid":"469640486","full_name":"TimLuq/fallback-dom","owner":"TimLuq","description":"Lightweight DOM/selector implementing the most basic operations","archived":false,"fork":false,"pushed_at":"2023-02-20T03:05:25.000Z","size":298,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T06:09:57.253Z","etag":null,"topics":["dom","javascript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/TimLuq.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":"2022-03-14T08:21:45.000Z","updated_at":"2022-03-14T12:14:42.000Z","dependencies_parsed_at":"2023-03-30T14:23:17.248Z","dependency_job_id":null,"html_url":"https://github.com/TimLuq/fallback-dom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimLuq/fallback-dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimLuq%2Ffallback-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimLuq%2Ffallback-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimLuq%2Ffallback-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimLuq%2Ffallback-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimLuq","download_url":"https://codeload.github.com/TimLuq/fallback-dom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimLuq%2Ffallback-dom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["dom","javascript"],"created_at":"2024-11-13T01:12:11.740Z","updated_at":"2026-04-17T03:01:49.253Z","avatar_url":"https://github.com/TimLuq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fallback-dom\n\nA lightweight standalone partial DOM implementation written in TypeScript.\nIt should work in all modern environments without any hassle or external dependencies. (Feel free to open an issue and prove me wrong!)\nThis could be useful for tests and other scenarios where a DOM is required but not available per default.\n\nThis is not a full implementation of DOM, but the aim is to behave close to spec for every exposed API, and expose the most common or simple parts.\nNotable exceptions to this are events and where the spec wants the returned value to be a live representation of matched nodes as long as the object lives, currently in this implementation they are computed at call time.\nThese special cases includes `Element.prototype.childNodes`, `Element.prototype.querySelectorAll`, etc.\n\nSupports namespaces and a partial version of `CustomElements`.\n\nThis package has three module files available for use:\n\n- `fallback-dom` (has a dependency on `query-selector`.)\n- `query-selector`\n- `xml-serializer`\n\nThis repo contains pre-built JS files to be able to be used as a git dependency without extra build steps. The only real source files are the ones matching `./*.ts`.\n\n## Module: fallback-dom\n\nMain module that exposes the partial DOM implementation.\n\n### Imports\n\n```js\nimport { querySel } from \"./query-selector.js\";\n```\n\n### Base classes\n\nThese should never be extended or initialized. An exception to this rule is `Element` which may be extended if the extended class then is registered on `Document.prototype.customElements`.\n\n```js\nexport { CDATASection, Comment, DocumentType, Element, Node, ProcessingInstruction, Text };\n```\n\nFunctions:\n\n```js\nexport { createDocument, createDocumentType, createHTMLDocument };\n```\n\n## Module: query-selector\n\nHelper module that applies a subset of CSS selectors to find matching elements.\n\nFunctions:\n\n```js\nexport { querySel };\n```\n\n## Module: xml-serializer\n\nExtension module that can be used to serialize the DOM to a string.\n\nFunctions:\n\n```js\nexport { serializeToString };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimluq%2Ffallback-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimluq%2Ffallback-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimluq%2Ffallback-dom/lists"}