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

@applitools/dom-snapshot

Package Overview
Dependencies
Maintainers
15
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/dom-snapshot - npm Package Compare versions

Comparing version 1.2.1 to 1.2.3

23

dist/processPage.js

@@ -1,2 +0,2 @@

// @applitools/dom-snapshot@1.2.1
// @applitools/dom-snapshot@1.2.3
function __processPage() {

@@ -71,3 +71,3 @@ var processPage = (function () {

function elementNodeFactory(domNodes, elementNode) {
let node;
let node, manualChildNodeIndexes;
const {nodeType} = elementNode;

@@ -78,11 +78,10 @@ if ([NODE_TYPES.ELEMENT, NODE_TYPES.DOCUMENT_FRAGMENT_NODE].includes(nodeType)) {

elementNode.nodeName === 'STYLE' &&
!elementNode.textContent &&
elementNode.sheet &&
elementNode.sheet.cssRules.length
) {
elementNode.appendChild(
docNode.createTextNode(
[...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
),
);
domNodes.push({
nodeType: NODE_TYPES.TEXT,
nodeValue: [...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
});
manualChildNodeIndexes = [domNodes.length - 1];
}

@@ -112,5 +111,7 @@

}),
childNodeIndexes: elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: [],
childNodeIndexes:
manualChildNodeIndexes ||
(elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: []),
};

@@ -117,0 +118,0 @@

@@ -1,2 +0,2 @@

// @applitools/dom-snapshot@1.2.1
// @applitools/dom-snapshot@1.2.3
function __processPageAndPoll() {

@@ -123,3 +123,3 @@ var processPageAndPoll = (function () {

function elementNodeFactory(domNodes, elementNode) {
let node;
let node, manualChildNodeIndexes;
const {nodeType} = elementNode;

@@ -130,11 +130,10 @@ if ([NODE_TYPES.ELEMENT, NODE_TYPES.DOCUMENT_FRAGMENT_NODE].includes(nodeType)) {

elementNode.nodeName === 'STYLE' &&
!elementNode.textContent &&
elementNode.sheet &&
elementNode.sheet.cssRules.length
) {
elementNode.appendChild(
docNode.createTextNode(
[...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
),
);
domNodes.push({
nodeType: NODE_TYPES.TEXT,
nodeValue: [...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
});
manualChildNodeIndexes = [domNodes.length - 1];
}

@@ -164,5 +163,7 @@

}),
childNodeIndexes: elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: [],
childNodeIndexes:
manualChildNodeIndexes ||
(elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: []),
};

@@ -169,0 +170,0 @@

@@ -1,2 +0,2 @@

// @applitools/dom-snapshot@1.2.1
// @applitools/dom-snapshot@1.2.3
function __processPageAndSerialize() {

@@ -123,3 +123,3 @@ var processPageAndSerialize = (function () {

function elementNodeFactory(domNodes, elementNode) {
let node;
let node, manualChildNodeIndexes;
const {nodeType} = elementNode;

@@ -130,11 +130,10 @@ if ([NODE_TYPES.ELEMENT, NODE_TYPES.DOCUMENT_FRAGMENT_NODE].includes(nodeType)) {

elementNode.nodeName === 'STYLE' &&
!elementNode.textContent &&
elementNode.sheet &&
elementNode.sheet.cssRules.length
) {
elementNode.appendChild(
docNode.createTextNode(
[...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
),
);
domNodes.push({
nodeType: NODE_TYPES.TEXT,
nodeValue: [...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
});
manualChildNodeIndexes = [domNodes.length - 1];
}

@@ -164,5 +163,7 @@

}),
childNodeIndexes: elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: [],
childNodeIndexes:
manualChildNodeIndexes ||
(elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: []),
};

@@ -169,0 +170,0 @@

{
"name": "@applitools/dom-snapshot",
"version": "1.2.1",
"version": "1.2.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -36,3 +36,3 @@ /* eslint-disable no-use-before-define */

function elementNodeFactory(domNodes, elementNode) {
let node;
let node, manualChildNodeIndexes;
const {nodeType} = elementNode;

@@ -43,11 +43,10 @@ if ([NODE_TYPES.ELEMENT, NODE_TYPES.DOCUMENT_FRAGMENT_NODE].includes(nodeType)) {

elementNode.nodeName === 'STYLE' &&
!elementNode.textContent &&
elementNode.sheet &&
elementNode.sheet.cssRules.length
) {
elementNode.appendChild(
docNode.createTextNode(
[...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
),
);
domNodes.push({
nodeType: NODE_TYPES.TEXT,
nodeValue: [...elementNode.sheet.cssRules].map(rule => rule.cssText).join(''),
});
manualChildNodeIndexes = [domNodes.length - 1];
}

@@ -77,5 +76,7 @@

}),
childNodeIndexes: elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: [],
childNodeIndexes:
manualChildNodeIndexes ||
(elementNode.childNodes.length
? childrenFactory(domNodes, elementNode.childNodes)
: []),
};

@@ -82,0 +83,0 @@

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