@percy/dom
Advanced tools
Comparing version 1.24.2 to 1.24.3-beta.0
@@ -331,2 +331,15 @@ (function() { | ||
// Drop loading attribute. We do not scroll page in discovery stage but we want to make sure that | ||
// all resources are requested, so we drop loading attribute [as it can be set to lazy] | ||
function dropLoadingAttribute(domElement) { | ||
var _domElement$tagName; | ||
if (!['img', 'iframe'].includes((_domElement$tagName = domElement.tagName) === null || _domElement$tagName === void 0 ? void 0 : _domElement$tagName.toLowerCase())) return; | ||
domElement.removeAttribute('loading'); | ||
} | ||
// All transformations that we need to apply for a successful discovery and stable render | ||
function applyElementTransformations(domElement) { | ||
dropLoadingAttribute(domElement); | ||
} | ||
/** | ||
@@ -359,2 +372,5 @@ * Custom deep clone function that replaces Percy's current clone behavior. | ||
let clone = node.cloneNode(); | ||
// We apply any element transformations here to avoid another treeWalk | ||
applyElementTransformations(clone); | ||
parent.appendChild(clone); | ||
@@ -361,0 +377,0 @@ |
{ | ||
"name": "@percy/dom", | ||
"version": "1.24.2", | ||
"version": "1.24.3-beta.0", | ||
"license": "MIT", | ||
@@ -37,3 +37,3 @@ "repository": { | ||
}, | ||
"gitHead": "b9c37345b1feebd06f3c87a6a6accf8cdb6d29a5" | ||
"gitHead": "1c5664ca09f7f3b3d3c20484348ee748295dd1e2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27682
506
2