{"id":14990079,"url":"https://github.com/webcomponents/template-shadowroot","last_synced_at":"2025-04-10T09:51:38.440Z","repository":{"id":40726695,"uuid":"220048154","full_name":"webcomponents/template-shadowroot","owner":"webcomponents","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-09T17:34:28.000Z","size":1978,"stargazers_count":38,"open_issues_count":24,"forks_count":8,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-29T15:32:28.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webcomponents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-06T17:02:54.000Z","updated_at":"2024-05-01T01:27:43.000Z","dependencies_parsed_at":"2024-06-18T15:23:17.929Z","dependency_job_id":"3cdca555-d4db-4e8c-b82f-ca268f1845c5","html_url":"https://github.com/webcomponents/template-shadowroot","commit_stats":{"total_commits":38,"total_committers":8,"mean_commits":4.75,"dds":0.4736842105263158,"last_synced_commit":"941aeecc24b156ed2b47d77f334d23e1f66922b7"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcomponents%2Ftemplate-shadowroot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcomponents%2Ftemplate-shadowroot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcomponents%2Ftemplate-shadowroot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcomponents%2Ftemplate-shadowroot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webcomponents","download_url":"https://codeload.github.com/webcomponents/template-shadowroot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248197931,"owners_count":21063623,"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-09-24T14:19:25.809Z","updated_at":"2025-04-10T09:51:38.419Z","avatar_url":"https://github.com/webcomponents.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Declarative Shadow DOM Ponyfill\n\nDeclarative Shadow DOM for SSR\n\nA [ponyfill](https://ponyfill.com/) of the API described by Mason Freed at https://github.com/mfreed7/declarative-shadow-dom.\n\n## Overview\n\nThis package provides a function, `hydrateShadowRoots`, that converts `\u003ctemplate\u003e` elements with a `shadowrootmode` attribute into ShadowRoots on the template's parent element.\n\nThis allows HTML with shadow roots to be serialized to plain HTML, and the serialized shadow roots \"rehydrated\" (separate from component hydration) on the client.\n\n`\u003ctemplate shadowrootmode\u003e` elements are transformed bottom up so that in the case where they're nested, all elements within the declarative shadow tree stay inert until they have all been moved from their `\u003ctemplate shadowrootmode\u003e` elements.\n\nIf native support for `\u003ctemplate shadowrootmode\u003e` is present, `hydrateShadowRoots` does nothing when called.\n\n### Known limitations\n\n* Does not currently look into imperatively created shadow roots.\n* The mutation observer implementation\n  * May not work properly in the face of streaming HTML parsing. Needs investigation.\n  * Will not notice imperatively created `\u003ctemplate shadowrootmode\u003e` elements inside of other shadow roots.\n* Not enough benchmarks, and benchmarks of insufficient quality to be confident of good performance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcomponents%2Ftemplate-shadowroot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebcomponents%2Ftemplate-shadowroot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcomponents%2Ftemplate-shadowroot/lists"}