@percy/dom
Advanced tools
Comparing version 1.29.4 to 1.29.5-beta.0
@@ -613,2 +613,18 @@ (function() { | ||
// This is used by SDK's in captureResponsiveSnapshot | ||
function waitForResize() { | ||
// if window resizeCount present means event listener was already present | ||
if (!window.resizeCount) { | ||
let resizeTimeout = false; | ||
window.addEventListener('resize', () => { | ||
if (resizeTimeout !== false) { | ||
clearTimeout(resizeTimeout); | ||
} | ||
resizeTimeout = setTimeout(() => window.resizeCount++, 100); | ||
}); | ||
} | ||
// always reset count 0 | ||
window.resizeCount = 0; | ||
} | ||
// Serializes a document and returns the resulting DOM string. | ||
@@ -670,2 +686,3 @@ function serializeDOM(options) { | ||
cookies: cookies, | ||
userAgent: navigator.userAgent, | ||
warnings: Array.from(ctx.warnings), | ||
@@ -728,2 +745,3 @@ resources: Array.from(ctx.resources), | ||
exports.serializeDOM = serializeDOM; | ||
exports.waitForResize = waitForResize; | ||
@@ -730,0 +748,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
{ | ||
"name": "@percy/dom", | ||
"version": "1.29.4", | ||
"version": "1.29.5-beta.0", | ||
"license": "MIT", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"access": "public", | ||
"tag": "latest" | ||
"tag": "beta" | ||
}, | ||
@@ -39,3 +39,3 @@ "main": "dist/bundle.js", | ||
}, | ||
"gitHead": "17468058cf55d75557451a81e82b0d6fd5c0e26b" | ||
"gitHead": "1edb0e95570ca077e8ef931b53399c04d71a95bd" | ||
} |
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
35309
695
2