Socket
Socket
Sign inDemoInstall

@percy/dom

Package Overview
Dependencies
Maintainers
6
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/dom - npm Package Compare versions

Comparing version 1.20.2 to 1.20.3

32

dist/bundle.js

@@ -143,3 +143,19 @@ (function() {

}
function styleSheetFromNode(node) {
/* istanbul ignore if: sanity check */
if (node.sheet) return node.sheet;
// Cloned style nodes don't have a sheet instance unless they are within
// a document; we get it by temporarily adding the rules to DOM
const tempStyle = node.cloneNode();
tempStyle.setAttribute('data-percy-style-helper', '');
tempStyle.innerHTML = node.innerHTML;
const clone = document.cloneNode();
clone.appendChild(tempStyle);
const sheet = tempStyle.sheet;
// Cleanup node
tempStyle.remove();
return sheet;
}
// Returns a mostly random uid.

@@ -183,18 +199,2 @@ function uid() {

}
function styleSheetFromNode(node) {
/* istanbul ignore if: sanity check */
if (node.sheet) return node.sheet;
// Cloned style nodes don't have a sheet instance unless they are within
// a document; we get it by temporarily adding the rules to DOM
const tempStyle = document.createElement('style');
tempStyle.setAttribute('data-percy-style-helper', '');
tempStyle.innerHTML = node.innerHTML;
const clone = document.cloneNode();
clone.appendChild(tempStyle);
const sheet = tempStyle.sheet;
// Cleanup node
tempStyle.remove();
return sheet;
}
function serializeCSSOM(_ref) {

@@ -201,0 +201,0 @@ let {

{
"name": "@percy/dom",
"version": "1.20.2",
"version": "1.20.3",
"license": "MIT",

@@ -37,3 +37,3 @@ "repository": {

},
"gitHead": "eb789262833734cfc4b7dbb888e889f571eb886e"
"gitHead": "520bd156af47080881b651e4819014cbacf76781"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc