Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@percy/dom

Package Overview
Dependencies
Maintainers
1
Versions
250
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.30.3-alpha.3 to 1.30.3-beta.0

25

dist/bundle.js

@@ -521,3 +521,4 @@ (function() {

clone.attachShadow({
mode: 'open'
mode: 'open',
serializable: true
});

@@ -551,10 +552,22 @@ }

function getOuterHTML(docElement) {
// firefox doesn't serialize shadow DOM, we're awaiting API's by firefox to become ready and are not polyfilling it.
if (!docElement.getInnerHTML) {
// All major browsers in latest versions supports getHTML API to get serialized DOM
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getHTML
// old firefox doesn't serialize shadow DOM, we're awaiting API's by firefox to become ready and are not polyfilling it.
// new firefox from 128 onwards serializes it using getHTML
/* istanbul ignore if: Only triggered in firefox <= 128 and tests runs on latest */
if (!docElement.getHTML) {
return docElement.outerHTML;
}
// chromium gives us declarative shadow DOM serialization API
let innerHTML = docElement.getInnerHTML({
includeShadowRoots: true
});
let innerHTML = '';
/* istanbul ignore else if: Only triggered in chrome <= 128 and tests runs on latest */
if (docElement.getHTML) {
innerHTML = docElement.getHTML({
serializableShadowRoots: true
});
} else if (docElement.getInnerHTML) {
innerHTML = docElement.getInnerHTML({
includeShadowRoots: true
});
}
docElement.textContent = '';

@@ -561,0 +574,0 @@ // Note: Here we are specifically passing replacer function to avoid any replacements due to

{
"name": "@percy/dom",
"version": "1.30.3-alpha.3",
"version": "1.30.3-beta.0",
"license": "MIT",

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

"access": "public",
"tag": "alpha"
"tag": "beta"
},

@@ -39,3 +39,3 @@ "main": "dist/bundle.js",

},
"gitHead": "4d36bd849268e2aa9987509c9fdd5d1224ce5157"
"gitHead": "8f5a9cb4b287900c4b053302452ea6f84d20c2f1"
}
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