@percy/dom 1.31.4-beta.0 → 1.31.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +5 -1
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -259,7 +259,8 @@
259
259
  clone,
260
260
  resources,
261
261
  cache,
262
- warnings
262
+ warnings,
263
+ ignoreStyleSheetSerializationErrors
263
264
  } = ctx;
264
265
  // in-memory CSSOM into their respective DOM nodes.
265
266
  let styleSheets = null;
@@ -277,6 +278,7 @@
277
278
  let cloneOwnerNode;
278
279
  try {
279
280
  styleId = styleSheet.ownerNode.getAttribute('data-percy-element-id');
281
+ if (!styleId && ignoreStyleSheetSerializationErrors) continue;
280
282
  cloneOwnerNode = clone.querySelector(`[data-percy-element-id="${styleId}"]`);
281
283
  if (styleSheetsMatch(styleSheet, styleSheetFromNode(cloneOwnerNode))) continue;
282
284
  let style = document.createElement('style');
@@ -802,6 +804,7 @@
802
804
  disableShadowDOM = options === null || options === void 0 ? void 0 : options.disable_shadow_dom,
803
805
  reshuffleInvalidTags = options === null || options === void 0 ? void 0 : options.reshuffle_invalid_tags,
804
806
  ignoreCanvasSerializationErrors = options === null || options === void 0 ? void 0 : options.ignore_canvas_serialization_errors,
807
+ ignoreStyleSheetSerializationErrors = options === null || options === void 0 ? void 0 : options.ignore_style_sheet_serialization_errors,
805
808
  forceShadowAsLightDOM = options === null || options === void 0 ? void 0 : options.force_shadow_dom_as_light_dom
806
809
  } = options || {};
807
810
 
@@ -815,6 +818,7 @@
815
818
  enableJavaScript,
816
819
  disableShadowDOM,
817
820
  ignoreCanvasSerializationErrors,
821
+ ignoreStyleSheetSerializationErrors,
818
822
  forceShadowAsLightDOM
819
823
  };
820
824
  ctx.dom = dom;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/dom",
3
- "version": "1.31.4-beta.0",
3
+ "version": "1.31.4-beta.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "interactor.js": "^2.0.0-beta.10"
37
37
  },
38
- "gitHead": "20314c32f823b7eab4b5ae470b7ddfbd7a73cb91"
38
+ "gitHead": "a0bd772d1d41454683a15b5c5223f7fc571f3b29"
39
39
  }