Skip to content
W

@webcomponents/shadydom

Web Components Polyfills

by webcomponents

#1090in UI Libraries
0In stores

Description

ShadyDOM is a shim for Shadow DOM V1 that is part of the Web Components polyfills. The README says it is less correct than the full ShadowDO…

Highlights

  • Shadow DOM V1 shim for browsers without native support
  • Transparent use when attachShadow is unavailable
  • Force mode with ShadyDOM = {force: true}
  • Asynchronous composition with a flush method for tests
  • Part of the Web Components polyfills

Ratings & Reviews

No ratings yet

Be the first to rate @webcomponents/shadydom.

People also visit

L

@lwc/synthetic-shadow

Shadow DOM polyfill by LWC

UI Libraries
Launch
W

@webcomponents/shadycss

ShadowDOM style encapsulation shim

UI Libraries
Launch
W

@webcomponents/custom-elements

HTML Custom Elements Polyfill

UI Libraries
Launch
V

vue-shadow-dom

Shadow dom support for Vue

UI Libraries
Launch
S

shadow-dom-testing-library

An extension of DOM-testing-library to provide hooks into the shadow dom

UI Libraries
Launch
M

Mastering Shadow DOM

by @MartineDowden

UI Libraries
Launch

@webcomponents/shadydom FAQ

What is ShadyDOM?

A shim that provides Shadow DOM V1 behavior in browsers that lack native support, and is part of the Web Components polyfills.

Is it the same as the ShadowDOM polyfill?

No. The README says ShadyDOM is less correct than the ShadowDOM polyfill, but less intrusive and faster.

How do I force it on?

Set ShadyDOM = {force: true} in a script before loading the polyfill, which makes it used even when native Shadow DOM is available.

Does it style shadow roots?

No. The README says ShadowDOM-compatible styling needs the shadycss shim.

Which APIs are missing?

The README says only DOM tree accessors and the mutation API are maintained, and APIs such as MutationObserver are not shimmed.

What are the best @webcomponents/shadydom alternatives?

Popular alternatives to @webcomponents/shadydom include @lwc/synthetic-shadow, @webcomponents/shadycss and @webcomponents/custom-elements. See all @webcomponents/shadydom alternatives

Developer Stuff

Badges