server-dom-shim
v1.0.2
Published
A simple shim for the server-side DOM API
Downloads
12,689
Maintainers
Readme
server-dom-shim
A simple shim for the server-side DOM API. No more HTMLElement is not defined
error during server-side rendering.
import {
CustomElementRegistry,
Element,
HTMLElement,
customElements,
} from 'server-dom-shim'
This package uses Node.js conditional exports to export different versions of the DOM API depending on the environment.
In Node.js environments, this package exports @lit-labs/ssr-dom-shim
package. In browser environments, this package exports native DOM API.
License
MIT