NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #4816 most downloaded on npm
DOM shim for Lit Server Side Rendering (SSR)
Latest stable
1.6.0
Last release 6 months ago
14 May 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 11 of 11 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
13 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
### Minor Changes - #4893 `6c051d517bd92761787897b2c8c060ed419126e2` Thanks @kyubisation! - Implement ShadowRoot and document in event path - #4894 `b
#4893 6c051d517bd92761787897b2c8c060ed419126e2 Thanks @kyubisation! - Implement ShadowRoot and document in event path
#4894 baa780d2b78a4b792cf61b220b8e3e186739d48c Thanks @kyubisation! - Add DOM shim implementation for MutationObserver, ResizeObserver and IntersectionObserver
#5240 b9de4295489b0caf91069bfe21f640f3ab5e12bb Thanks @kyubisation! - Register CSSStyleSheet polyfill in global scope when using Node.js hook for importing CSS files
#5330 077a4b727d0d30540f1813bbbe66477790c9805e Thanks @cecilyhunt! - fix(ssr-dom-shim): Add stubs for TS 6.0.3 compatibility
Your coding agent can read these notes before it upgrades. Set up the MCP server →
### Patch Changes - #5202 `f7b60025d93463c74d59001c6f01c38c41b1e816` Thanks @kyubisation! - Add register css hook file to publishable files
f7b60025d93463c74d59001c6f01c38c41b1e816 Thanks @kyubisation! - Add register css hook file to publishable files### Minor Changes - #4879 `5057feeac96cc6eb3c5e5c1cb6c42bc01ac6aab1` Thanks @kyubisation! - Implement limited shim for CSSStyleSheet and CSS loader fo
5057feeac96cc6eb3c5e5c1cb6c42bc01ac6aab1 Thanks @kyubisation! - Implement limited shim for CSSStyleSheet and CSS loader for Node.jsad23f26ae908a160d30ed2a939b322fe9cc2ee83 Thanks @kyubisation! - Update TypeScript dependencies to version 5.8 with related ARIAMixin changes (ariaColIndexText, ariaRelevant and ariaRowIndexText)### Minor Changes - #4987 `3ac01aee` - Implement the full CustomElementRegistry type for the ssr shim. Improves fidelity and compilability.
### Minor Changes - #4755 `25962bf5` Thanks @kyubisation! - Implement SSR event handling and an optional flag globalThis.litSsrCallConnectedCallback t
25962bf5 Thanks @kyubisation! - Implement SSR event handling and an optional flag globalThis.litSsrCallConnectedCallback to call connectedCallback during SSR, if set to true.### Patch Changes - #4553 `65bc240c` Thanks @kyubisation! - Implement Element.localName and Element.tagName. Fixes 3375.
65bc240c Thanks @kyubisation! - Implement Element.localName and Element.tagName. Fixes 3375.### Minor Changes - #4493 `e901c582` - Add toggleAttribute to the Element shim.
#3885 7932f7dd - @lit-labs/ssr-react and @lit-labs/react now coordinate prop handling during server rendering and hydration.
@lit-labs/ssr-react will call setAttribute() with all props provided during server rendering unless they are provided in <code>_$litProps$</code> object made by @lit-labs/react. Previously, it would call setProperty() for props that were found in the element's prototype, and setAttribute() for those that weren't. If you wish to server render custom elements that take properties that can not be set as attributes (i.e. not serializeable or have different name as attribute/property), you must use @lit-labs/react to create a React wrapper component.@lit-labs/react now has a Node build and export condition to do special prop handling during server rendering. It detects the presence of React.createElement monkey patch by @lit-labs/ssr-react and provides props to be set as properties to the createElement() call.@lit-labs/ssr-react will add the defer-hydration attribute to custom elements that had properties set so that @lit-labs/react wrapped elements have a chance to set properties on the element before Lit element hydration is triggered.@lit-labs/react wrapped components will suppress hydration warnings raised by React due to server rendered attributes.### Patch Changes - #4598 `7cfb2274` Thanks @jun-sheaf! - Use target.set instead of member assignment in @consume() decorator.
7cfb2274 Thanks @jun-sheaf! - Use target.set instead of member assignment in @consume() decorator.### Patch Changes - #4141 `6b515e43` - Update TypeScript to ~5.2.0
### Patch Changes - #3814 `23326c6b` - Update to TypeScript v5.0
### Patch Changes - #4903 `6a232e92` - Add Lit Labs noticed to README
Updated dependencies \[`feccc1ba`, `290a608a`]:
62df19da Thanks @autopulated! - ContextProvider can now be added to any HTML elements, not just custom elements implementing a ReactiveControllerHost.### Major Changes - #4170 `04c8d65a` - Graduate @lit-labs/task to @lit/task, its permanent location. @lit-labs/task is now just a proxy for @lit/task,
@lit/reactive-element is a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes to LitElement (what was previously called UpdatingElement) into a separate package. LitElement now extends ReactiveElement to add lit-html rendering via the render() callback. See ReactiveElement API for more details.UpdatingElement has been renamed to ReactiveElement.updating-element package has been renamed to @lit/reactive-element.@internalProperty decorator has been renamed to @state._getUpdateComplete to getUpdateComplete.reflect: true and its toAttribute function returns undefined the attribute is now removed where previously it was left unchanged (#872).unhandledrejection event handler on window.renderRoot is now created when the element's connectedCallback is initially run.requestUpdateInternal. The requestUpdate method is now identical to this method and should be used instead.initialize method has been removed. This work is now done in the element constructor.static addInitializer for adding a function which is called with the element instance when is created. This can be used, for example, to create decorators which hook into element lifecycle by creating a reactive controller (#1663).connectedCallback, disconnectedCallback, willUpdate, update, and updated. To ensure it has access to the element lifecycle, a controller should be added in the element's constructor. To add a controller to the element, call addController(controller).removeController(controller) which can be used to remove a controller from a ReactiveElement.willUpdate(changedProperties) lifecycle method to UpdatingElement. This is called before the update method and can be used to compute derived state needed for updating. This method is intended to be called during server side rendering and should not manipulate element DOM.#3522 72fcf0d7 - When running in Node, Lit now automatically includes minimal DOM shims which are
sufficient for most SSR (Server Side Rendering) use-cases, removing the need to
import the global DOM shim from @lit-labs/ssr.
The new @lit-labs/ssr-dom-shim package has been introduced, which exports an HTMLElement, CustomElementRegistry, and default customElements singleton.
The existing @lit-labs/ssr global DOM shim can still be used, and is compatible with the new package, because @lit-labs/ssr imports from @lit-labs/ssr-dom-shim. Importing the global DOM shim adds more APIs to the global object, such as a global HTMLElement, TreeWalker, fetch, and other APIs. It is recommended that users try to remove usage of the @lit-labs/ssr DOM shim, and instead rely on the more minimal, automatic shimming that @lit/reactive-element now provides automatically.
One column per quarter.