@percy/dom
Advanced tools
Comparing version 1.28.2 to 1.28.3-alpha.1
@@ -22,2 +22,12 @@ (function() { | ||
case 'radio': | ||
/* | ||
here we are removing the checked attr if present by default, | ||
so that only the current selected radio-button will have the checked attr present in the dom | ||
this happens because in html, | ||
when the checked attribute is present in the multiple radio-buttons for which only one can be selected at a time, | ||
the browser will only render the last checked radio-button by default, | ||
when a user selects any particular radio-button, the checked attribute on other buttons is not removed, | ||
hence sometimes it shows inconsistent state as html will still show the last radio as selected. | ||
*/ | ||
cloneEl.removeAttribute('checked'); | ||
if (elem.checked) { | ||
@@ -383,5 +393,12 @@ cloneEl.setAttribute('checked', ''); | ||
let src = node.src; | ||
let isHrefUsed = false; | ||
// case for SVGAnimatedString | ||
if (src == null && node.href) { | ||
isHrefUsed = true; | ||
src = node.href.baseVal; | ||
} | ||
// skip if src is null | ||
if (src == null) return; | ||
let base64String = getBase64Substring(src); | ||
let base64String = getBase64Substring(src.toString()); | ||
// skip if src is not base64 | ||
@@ -393,3 +410,7 @@ if (base64String == null) return; | ||
resources.add(resource); | ||
node.src = resource.url; | ||
if (isHrefUsed === true) { | ||
node.href.baseVal = resource.url; | ||
} else { | ||
node.src = resource.url; | ||
} | ||
} | ||
@@ -396,0 +417,0 @@ |
{ | ||
"name": "@percy/dom", | ||
"version": "1.28.2", | ||
"version": "1.28.3-alpha.1", | ||
"license": "MIT", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"access": "public", | ||
"tag": "latest" | ||
"tag": "alpha" | ||
}, | ||
@@ -39,3 +39,3 @@ "main": "dist/bundle.js", | ||
}, | ||
"gitHead": "88105fef569632b816955fcd1320bcc4b218bf67" | ||
"gitHead": "af2067cad8ac8f67dacf2cf7e28ab257e0bac12f" | ||
} |
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
33607
643
2