Gathering detailed insights and metrics for @lit-labs/ssr-dom-shim
Gathering detailed insights and metrics for @lit-labs/ssr-dom-shim
Gathering detailed insights and metrics for @lit-labs/ssr-dom-shim
Gathering detailed insights and metrics for @lit-labs/ssr-dom-shim
Lit is a simple library for building fast, lightweight web components.
npm install @lit-labs/ssr-dom-shim
Typescript
Module System
Node Version
NPM Version
99.9
Supply Chain
89.8
Quality
84.3
Maintenance
100
Vulnerability
100
License
lit@3.3.0
Updated on Apr 11, 2025
@lit/reactive-element@2.1.0
Updated on Apr 11, 2025
lit-html@3.3.0
Updated on Apr 11, 2025
lit-element@4.2.0
Updated on Apr 11, 2025
@lit/context@1.1.5
Updated on Apr 11, 2025
@lit-labs/nextjs@0.2.3
Updated on Apr 11, 2025
TypeScript (58.93%)
JavaScript (38.48%)
HTML (2.19%)
CSS (0.23%)
Vue (0.17%)
Shell (0.01%)
Total Downloads
142,728,887
Last Day
86,380
Last Week
2,105,843
Last Month
9,162,866
Last Year
86,817,530
BSD-3-Clause License
19,796 Stars
2,567 Commits
969 Forks
210 Watchers
216 Branches
194 Contributors
Updated on Jun 09, 2025
Minified
Minified + Gzipped
Latest Version
1.3.0
Package Id
@lit-labs/ssr-dom-shim@1.3.0
Unpacked Size
81.01 kB
Size
20.09 kB
File Count
14
NPM Version
10.8.2
Node Version
20.18.1
Published on
Jan 11, 2025
Cumulative downloads
Total Downloads
Last Day
8.5%
86,380
Compared to previous day
Last Week
-9.5%
2,105,843
Compared to previous week
Last Month
2%
9,162,866
Compared to previous month
Last Year
79.8%
86,817,530
Compared to previous year
No dependencies detected.
This package provides minimal implementations of Element
, HTMLElement
,
EventTarget
, Event
, CustomEvent
, CustomElementRegistry
, and
customElements
, designed to be used when Server Side Rendering (SSR) web
components from Node, including Lit components.
Lit itself automatically imports these shims when running in Node, so Lit users should typically not need to directly depend on or import from this package.
See the lit.dev SSR docs for general information about server-side rendering with Lit.
Other libraries or frameworks who wish to support SSR are welcome to also depend
on these shims. (This package is planned to eventually move to
@webcomponents/ssr-dom-shim
to better reflect this use case). There are two
main patterns for providing access to these shims to users:
Assigning shims to globalThis
, ensuring that assignment occurs before
user-code runs.
Importing shims directly from the module that provides your base class, using
the node
export
condition to
ensure this only happens when running in Node, and not in the browser.
Lit takes approach #2 for all of the shims except for customElements
, Event
and CustomEvent
, so that users who have imported lit
are able to call
customElements.define
or new Event(...)
/new CustomEvent(...)
in their
components from Node.
The main module exports the following values. Note that no globals are set by this module.
EventTarget
Element
attachShadow
shadowRoot
attributes
hasAttribute
getAttribute
setAttribute
removeAttribute
HTMLElement
CustomElementRegistry
customElements
Event
CustomEvent
Please see CONTRIBUTING.md.
No vulnerabilities found.
Reason
all last 30 commits are reviewed through GitHub
Reason
30 commit(s) out of 30 and 22 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
no vulnerabilities detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
dangerous workflow patterns detected
Details
Reason
security policy file not detected
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More