JSPM

  • Created
  • Published
  • Downloads 69073
  • Score
    100M100P100Q172647F
  • 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 Components

Open Web Components provides a set of defaults, recommendations and tools to help facilitate your web component project. Our recommendations include: developing, linting, testing, building, tooling, demoing, publishing and automating.

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);