JSPM

  • Created
  • Published
  • Downloads 64256
  • Score
    100M100P100Q169233F
  • License MIT

To compare dom and shadow dom trees. Part of open-wc recommendations

Package Exports

  • @open-wc/semantic-dom-diff

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@open-wc/semantic-dom-diff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Semantic Dom Diff

Part of Open Web Component Recommendation open-wc

We want to provide a good set of default on how to facilitate your web component.

CircleCI BrowserStack Status Renovate enabled

Manual Setup

yarn add @open-wc/semantic-dom-diff --dev

Basics

import { getSemanticDomDiff } from '@open-wc/semantic-dom-diff';

const leftTree = `
  <div>foo</div>
`;
const rightTree = `
  <div>bar</div>
`;

// Diff will be an object if there is a difference, otherwise undefined
const diff = getSemanticDomDiff(leftTree, rightTree);