🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

server-dom-shim

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server-dom-shim

A simple shim for the server-side DOM API

1.0.2
latest
Version published
Weekly downloads
2.7K
-18.45%
Maintainers
1
Weekly downloads
 
Created

server-dom-shim

NPM version

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

FAQs

Package last updated on 02 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts